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.

108 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. HRESULT
  45. PublishDsData(
  46. IADs *pADs,
  47. PWSTR pValue,
  48. DWORD dwType,
  49. PBYTE pData
  50. );
  51. HRESULT
  52. SetProperties(
  53. HANDLE hPrinter,
  54. PWSTR pszServerName,
  55. PWSTR pszShortServerName,
  56. PWSTR pszUNCName,
  57. PWSTR pszPrinterName,
  58. DWORD dwVersion,
  59. IADs *pPrintQueue
  60. );
  61. HRESULT
  62. SetMandatoryProperties(
  63. PWSTR pszServerName,
  64. PWSTR pszShortServerName,
  65. PWSTR pszUNCName,
  66. PWSTR pszPrinterName,
  67. DWORD dwVersion,
  68. IADs *pPrintQueue
  69. );
  70. HRESULT
  71. SetSpoolerProperties(
  72. HANDLE hPrinter,
  73. IADs *pPrintQueue,
  74. DWORD dwVersion
  75. );
  76. HRESULT
  77. SetDriverProperties(
  78. HANDLE hPrinter,
  79. IADs *pPrintQueue
  80. );