Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

134 lines
2.4 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. All rights reserved
  4. Module Name:
  5. local.h
  6. // @@BEGIN_DDKSPLIT
  7. Abstract:
  8. DDK version of local.h
  9. Environment:
  10. User Mode -Win32
  11. Revision History:
  12. // @@END_DDKSPLIT
  13. --*/
  14. #ifndef _LOCAL_H_
  15. #define _LOCAL_H_
  16. // @@BEGIN_DDKSPLIT
  17. #include <nt.h>
  18. #include <ntrtl.h>
  19. #include <nturtl.h>
  20. /*
  21. // @@END_DDKSPLIT
  22. typedef long NTSTATUS;
  23. // @@BEGIN_DDKSPLIT
  24. */
  25. // @@END_DDKSPLIT
  26. #include <windows.h>
  27. #include <winspool.h>
  28. #include <winsplp.h>
  29. #include <wchar.h>
  30. #include "winprint.h"
  31. // @@BEGIN_DDKSPLIT
  32. #ifdef INTERNAL
  33. #include "splcom.h"
  34. #else
  35. // @@END_DDKSPLIT
  36. #include <winddiui.h>
  37. typedef struct _pfnWinSpoolDrv {
  38. BOOL (*pfnOpenPrinter)(LPTSTR, LPHANDLE, LPPRINTER_DEFAULTS);
  39. BOOL (*pfnClosePrinter)(HANDLE);
  40. BOOL (*pfnDevQueryPrint)(HANDLE, LPDEVMODE, DWORD *, LPWSTR, DWORD);
  41. BOOL (*pfnPrinterEvent)(LPWSTR, INT, DWORD, LPARAM);
  42. LONG (*pfnDocumentProperties)(HWND, HANDLE, LPWSTR, PDEVMODE, PDEVMODE, DWORD);
  43. HANDLE (*pfnLoadPrinterDriver)(HANDLE);
  44. BOOL (*pfnSetDefaultPrinter)(LPCWSTR);
  45. BOOL (*pfnGetDefaultPrinter)(LPWSTR, LPDWORD);
  46. HANDLE (*pfnRefCntLoadDriver)(LPWSTR, DWORD, DWORD, BOOL);
  47. BOOL (*pfnRefCntUnloadDriver)(HANDLE, BOOL);
  48. BOOL (*pfnForceUnloadDriver)(LPWSTR);
  49. } fnWinSpoolDrv, *pfnWinSpoolDrv;
  50. BOOL
  51. SplInitializeWinSpoolDrv(
  52. pfnWinSpoolDrv pfnList
  53. );
  54. BOOL
  55. GetJobAttributes(
  56. LPWSTR pPrinterName,
  57. LPDEVMODEW pDevmode,
  58. PATTRIBUTE_INFO_3 pAttributeInfo
  59. );
  60. #define LOG_ERROR EVENTLOG_ERROR_TYPE
  61. LPWSTR AllocSplStr(LPWSTR pStr);
  62. LPVOID AllocSplMem(DWORD cbAlloc);
  63. LPVOID ReallocSplMem( LPVOID pOldMem,
  64. DWORD cbOld,
  65. DWORD cbNew);
  66. #define FreeSplMem( pMem ) (GlobalFree( pMem ) ? FALSE:TRUE)
  67. #define FreeSplStr( lpStr ) ((lpStr) ? (GlobalFree(lpStr) ? FALSE:TRUE):TRUE)
  68. // @@BEGIN_DDKSPLIT
  69. #endif // INTERNAL
  70. // @@END_DDKSPLIT
  71. //
  72. // DEBUGGING:
  73. //
  74. #if DBG
  75. BOOL
  76. DebugPrint(
  77. PCH pszFmt,
  78. ...
  79. );
  80. //
  81. // ODS - OutputDebugString
  82. //
  83. #define ODS( MsgAndArgs ) \
  84. do { \
  85. DebugPrint MsgAndArgs; \
  86. } while(0)
  87. #else
  88. //
  89. // No debugging
  90. //
  91. #define ODS(x)
  92. #endif // DBG
  93. // @@BEGIN_DDKSPLIT
  94. //#endif // INTERNAL
  95. // @@END_DDKSPLIT
  96. #endif