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.

167 lines
2.2 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. PWSTR
  11. GetUNCName(
  12. HANDLE hPrinter
  13. );
  14. DWORD
  15. PrintQueueExists(
  16. HWND hwnd,
  17. HANDLE hPrinter,
  18. PWSTR pszUNCName,
  19. DWORD dwAction,
  20. PWSTR pszTargetDN,
  21. PWSTR *ppszObjectDN
  22. );
  23. HRESULT
  24. GetPublishPointFromGUID(
  25. PCWSTR pszObjectGUID,
  26. PWSTR *ppszDN,
  27. PWSTR *ppszCN
  28. );
  29. DWORD
  30. UNC2Server(
  31. PCWSTR pszUNC,
  32. PWSTR *ppszServer
  33. );
  34. DWORD
  35. UNC2Printer(
  36. PCWSTR pszUNC,
  37. PWSTR *ppszPrinter
  38. );
  39. BOOL
  40. ThisIsAColorPrinter(
  41. LPCTSTR lpstrName
  42. );
  43. HRESULT
  44. DeleteDSObject(
  45. PWSTR pszADsPath
  46. );
  47. DWORD
  48. GetCommonName(
  49. HANDLE hPrinter,
  50. PWSTR *ppszCommonName
  51. );
  52. PWSTR
  53. AllocGlobalStr(
  54. PWSTR pszIn
  55. );
  56. VOID
  57. FreeGlobalStr(
  58. PWSTR pszIn
  59. );
  60. DWORD
  61. GetADsPathFromGUID(
  62. PCWSTR pszObjectGUID,
  63. PWSTR *ppszDN
  64. );
  65. PWSTR
  66. GetDNWithServer(
  67. PCWSTR pszDNIn
  68. );
  69. DWORD
  70. hr2dw(
  71. HRESULT hr
  72. );
  73. PWSTR
  74. DelimString2MultiSz(
  75. PWSTR pszIn,
  76. WCHAR wcDelim
  77. );
  78. HRESULT
  79. GetPrinterInfo2(
  80. HANDLE hPrinter,
  81. PPRINTER_INFO_2 *ppInfo2
  82. );
  83. DWORD
  84. FQDN2Canonical(
  85. PWSTR pszIn,
  86. PWSTR *ppszOut
  87. );
  88. HRESULT
  89. FQDN2CNDN(
  90. PWSTR pszDCName,
  91. PWSTR pszFQDN,
  92. PWSTR *ppszCN,
  93. PWSTR *ppszDN
  94. );
  95. HRESULT
  96. BuildLDAPPath(
  97. PWSTR pszDC,
  98. PWSTR pszFQDN,
  99. PWSTR *ppszLDAPPath
  100. );
  101. DWORD
  102. Bind2DS(
  103. HANDLE *phDS,
  104. DOMAIN_CONTROLLER_INFO **ppDCI,
  105. ULONG Flags
  106. );
  107. PWSTR
  108. DevCapStrings2MultiSz(
  109. PWSTR pszDevCapString,
  110. DWORD nDevCapStrings,
  111. DWORD dwDevCapStringLength,
  112. DWORD *pcbBytes
  113. );
  114. BOOL
  115. DevCapMultiSz(
  116. PWSTR pszUNCName,
  117. IADs *pPrintQueue,
  118. WORD fwCapability,
  119. DWORD dwElementBytes,
  120. PWSTR pszAttributeName
  121. );
  122. HRESULT
  123. MachineIsInMyForest(
  124. PWSTR pszMachineName
  125. );