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.

117 lines
1.9 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Abstract:
  4. This module provides functionality for publishing printers
  5. Author:
  6. Steve Wilson (NT) November 1997
  7. Revision History:
  8. --*/
  9. #define BAIL_ON_NULL(p) \
  10. if (!(p)) { \
  11. goto error; \
  12. }
  13. #define BAIL_ON_FAILURE(hr) \
  14. if (FAILED(hr)) { \
  15. goto error; \
  16. }
  17. #define FREE_INTERFACE(pInterface) \
  18. if (pInterface) { \
  19. pInterface->Release(); \
  20. pInterface=NULL; \
  21. }
  22. #define FREE_UNICODE_STRING(pString) \
  23. if (pString) { \
  24. FreeUnicodeString(pString); \
  25. }
  26. #define FREE_BSTR(bstr) \
  27. if (bstr) { \
  28. SysFreeString(bstr); \
  29. bstr = NULL; \
  30. }
  31. // Declarations
  32. DWORD
  33. PublishDownlevelPrinter(
  34. HANDLE hPrinter,
  35. PWSTR pszDN,
  36. PWSTR pszCN,
  37. PWSTR pszServerName,
  38. PWSTR pszShortServerName,
  39. PWSTR pszUNCName,
  40. PWSTR pszPrinterName,
  41. DWORD dwVersion,
  42. PWSTR *ppszObjectDN
  43. );
  44. DWORD
  45. PublishNT5Printer(
  46. HANDLE hPrinter,
  47. PWSTR pszDN,
  48. PWSTR pszCN,
  49. PWSTR *ppszObjectDN
  50. );
  51. HRESULT
  52. PublishDsData(
  53. IADs *pADs,
  54. PWSTR pValue,
  55. DWORD dwType,
  56. PBYTE pData
  57. );
  58. HRESULT
  59. SetProperties(
  60. HANDLE hPrinter,
  61. PWSTR pszServerName,
  62. PWSTR pszShortServerName,
  63. PWSTR pszUNCName,
  64. PWSTR pszPrinterName,
  65. DWORD dwVersion,
  66. IADs *pPrintQueue
  67. );
  68. HRESULT
  69. SetMandatoryProperties(
  70. PWSTR pszServerName,
  71. PWSTR pszShortServerName,
  72. PWSTR pszUNCName,
  73. PWSTR pszPrinterName,
  74. DWORD dwVersion,
  75. IADs *pPrintQueue
  76. );
  77. HRESULT
  78. SetSpoolerProperties(
  79. HANDLE hPrinter,
  80. IADs *pPrintQueue,
  81. DWORD dwVersion
  82. );
  83. HRESULT
  84. SetDriverProperties(
  85. HANDLE hPrinter,
  86. IADs *pPrintQueue
  87. );