Leaked source code of windows server 2003
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.

117 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 1997-1999 Microsoft Corporation
  3. Module Name:
  4. cliumpd.h
  5. Abstract:
  6. User-mode printer driver header file
  7. Environment:
  8. Windows NT 5.0
  9. Revision History:
  10. 06/30/97 -davidx-
  11. Created it.
  12. --*/
  13. #ifndef _UMPD_H_
  14. #define _UMPD_H_
  15. //
  16. // Critical section for user-mode printer driver
  17. //
  18. extern RTL_CRITICAL_SECTION semUMPD;
  19. #define UMPDFLAG_DRVENABLEDRIVER_CALLED 0x0001
  20. #define UMPDFLAG_METAFILE_DRIVER 0x0002
  21. #define UMPDFLAG_NON_METAFILE_DRIVER 0x0004
  22. //
  23. // Data structure signature for debugging purposes
  24. //
  25. #define UMPD_SIGNATURE 0xfedcba98
  26. #define VALID_UMPD(p) ((p) != NULL && (p)->dwSignature == UMPD_SIGNATURE)
  27. //
  28. // User-mode printer driver support functions
  29. //
  30. BOOL
  31. LoadUserModePrinterDriver(
  32. HANDLE hPrinter,
  33. LPWSTR pwstrPrinterName,
  34. PUMPD *ppUMPD,
  35. PRINTER_DEFAULTSW *pdefaults
  36. );
  37. BOOL
  38. LoadUserModePrinterDriverEx(
  39. PDRIVER_INFO_5W pDriverInfo5,
  40. LPWSTR pwstrPrinterName,
  41. PUMPD *ppUMPD,
  42. PRINTER_DEFAULTSW *pdefaults,
  43. HANDLE hPrinter
  44. );
  45. UnloadUserModePrinterDriver(
  46. PUMPD pUMPD,
  47. BOOL bNotifySpooler,
  48. HANDLE hPrinter
  49. );
  50. /*++
  51. Routine Description:
  52. This entrypoint must be exported by a user-mode printer driver DLL.
  53. GDI calls this function to query various information about the driver.
  54. Arguments:
  55. dwMode - Specifies what information is being queried
  56. pBuffer - Points to an output buffer for storing the returned information
  57. cbBuf - Size of the output buffer in bytes
  58. pcbNeeded - Returns the expected size of the output buffer
  59. Return Value:
  60. TRUE if successful, FALSE if there is an error
  61. Note:
  62. If cbBuf is not large enough to stored the necessary return information,
  63. the driver should return FALSE from this function and set last error code
  64. to ERROR_INSUFFICIENT_BUFFER. *pcbNeeded always contains the expected
  65. size of the output buffer.
  66. --*/
  67. typedef BOOL (APIENTRY *PFN_DrvQueryDriverInfo)(
  68. DWORD dwMode,
  69. PVOID pBuffer,
  70. DWORD cbBuf,
  71. PDWORD pcbNeeded
  72. );
  73. PUMPD
  74. UMPDDrvEnableDriver(
  75. PWSTR pDriverDllName,
  76. ULONG iEngineVersion
  77. );
  78. #endif // !_UMPD_H_
  79.