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.

181 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Abstract:
  4. This module provides utilities useful for Directory Service interactions
  5. Author:
  6. Steve Wilson (NT) November 1997
  7. Revision History:
  8. --*/
  9. #define dw2hr(dw) ((dw == ERROR_SUCCESS) ? dw : MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, dw))
  10. typedef struct _ArgTable {
  11. PSTR pszToken;
  12. DWORD (*ArgFunction)(PSTR pszArg);
  13. } ARGTABLE, *PARGTABLE;
  14. PWSTR
  15. GetUNCName(
  16. HANDLE hPrinter
  17. );
  18. DWORD
  19. PrintQueueExists(
  20. HWND hwnd,
  21. HANDLE hPrinter,
  22. PWSTR pszUNCName,
  23. DWORD dwAction,
  24. PWSTR pszTargetDN,
  25. PWSTR *ppszObjectDN
  26. );
  27. DWORD
  28. MovePrintQueue(
  29. PCWSTR pszObjectGUID,
  30. PCWSTR pszNewContainer, // Container path
  31. PCWSTR pszNewCN // Object CN
  32. );
  33. HRESULT
  34. GetPublishPointFromGUID(
  35. PCWSTR pszObjectGUID,
  36. PWSTR *ppszDN,
  37. PWSTR *ppszCN
  38. );
  39. DWORD
  40. UNC2Server(
  41. PCWSTR pszUNC,
  42. PWSTR *ppszServer
  43. );
  44. DWORD
  45. UNC2Printer(
  46. PCWSTR pszUNC,
  47. PWSTR *ppszPrinter
  48. );
  49. BOOL
  50. ThisIsAColorPrinter(
  51. LPCTSTR lpstrName
  52. );
  53. HRESULT
  54. DeleteDSObject(
  55. PWSTR pszADsPath
  56. );
  57. DWORD
  58. GetCommonName(
  59. HANDLE hPrinter,
  60. PWSTR *ppszCommonName
  61. );
  62. PWSTR
  63. AllocGlobalStr(
  64. PWSTR pszIn
  65. );
  66. VOID
  67. FreeGlobalStr(
  68. PWSTR pszIn
  69. );
  70. DWORD
  71. GetADsPathFromGUID(
  72. PCWSTR pszObjectGUID,
  73. PWSTR *ppszDN
  74. );
  75. PWSTR
  76. GetDNWithServer(
  77. PCWSTR pszDNIn
  78. );
  79. DWORD
  80. hr2dw(
  81. HRESULT hr
  82. );
  83. PWSTR
  84. DelimString2MultiSz(
  85. PWSTR pszIn,
  86. WCHAR wcDelim
  87. );
  88. HRESULT
  89. GetPrinterInfo2(
  90. HANDLE hPrinter,
  91. PPRINTER_INFO_2 *ppInfo2
  92. );
  93. DWORD
  94. FQDN2Canonical(
  95. PWSTR pszIn,
  96. PWSTR *ppszOut
  97. );
  98. HRESULT
  99. FQDN2CNDN(
  100. PWSTR pszDCName,
  101. PWSTR pszFQDN,
  102. PWSTR *ppszCN,
  103. PWSTR *ppszDN
  104. );
  105. HRESULT
  106. BuildLDAPPath(
  107. PWSTR pszDC,
  108. PWSTR pszFQDN,
  109. PWSTR *ppszLDAPPath
  110. );
  111. DWORD
  112. Bind2DS(
  113. HANDLE *phDS,
  114. DOMAIN_CONTROLLER_INFO **ppDCI,
  115. ULONG Flags
  116. );
  117. PWSTR
  118. DevCapStrings2MultiSz(
  119. PWSTR pszDevCapString,
  120. DWORD nDevCapStrings,
  121. DWORD dwDevCapStringLength,
  122. DWORD *pcbBytes
  123. );
  124. BOOL
  125. DevCapMultiSz(
  126. PWSTR pszUNCName,
  127. IADs *pPrintQueue,
  128. WORD fwCapability,
  129. DWORD dwElementBytes,
  130. PWSTR pszAttributeName
  131. );
  132. HRESULT
  133. MachineIsInMyForest(
  134. PWSTR pszMachineName
  135. );