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.

232 lines
3.7 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996-1999
  5. //
  6. // File: oleds.h
  7. //
  8. // Contents: Public header file for all oleds client code
  9. //
  10. //----------------------------------------------------------------------------
  11. #ifndef _ADSHLP_
  12. #define _ADSHLP_
  13. #if _MSC_VER > 1000
  14. #pragma once
  15. #endif
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. HRESULT WINAPI
  20. ADsGetObject(
  21. LPCWSTR lpszPathName,
  22. REFIID riid,
  23. VOID * * ppObject
  24. );
  25. HRESULT WINAPI
  26. ADsBuildEnumerator(
  27. IADsContainer *pADsContainer,
  28. IEnumVARIANT **ppEnumVariant
  29. );
  30. HRESULT WINAPI
  31. ADsFreeEnumerator(
  32. IEnumVARIANT *pEnumVariant
  33. );
  34. HRESULT WINAPI
  35. ADsEnumerateNext(
  36. IEnumVARIANT *pEnumVariant,
  37. ULONG cElements,
  38. VARIANT FAR *pvar,
  39. ULONG FAR *pcElementsFetched
  40. );
  41. HRESULT WINAPI
  42. ADsBuildVarArrayStr(
  43. LPWSTR * lppPathNames,
  44. DWORD dwPathNames,
  45. VARIANT * pVar
  46. );
  47. HRESULT WINAPI
  48. ADsBuildVarArrayInt(
  49. LPDWORD lpdwObjectTypes,
  50. DWORD dwObjectTypes,
  51. VARIANT * pVar
  52. );
  53. HRESULT WINAPI
  54. ADsOpenObject(
  55. LPCWSTR lpszPathName,
  56. LPCWSTR lpszUserName,
  57. LPCWSTR lpszPassword,
  58. DWORD dwReserved,
  59. REFIID riid,
  60. void FAR * FAR * ppObject
  61. );
  62. //
  63. // Helper functions for extended error support
  64. //
  65. HRESULT WINAPI
  66. ADsGetLastError(
  67. OUT LPDWORD lpError,
  68. OUT LPWSTR lpErrorBuf,
  69. IN DWORD dwErrorBufLen,
  70. OUT LPWSTR lpNameBuf,
  71. IN DWORD dwNameBufLen
  72. );
  73. VOID WINAPI
  74. ADsSetLastError(
  75. IN DWORD dwErr,
  76. IN LPCWSTR pszError,
  77. IN LPCWSTR pszProvider
  78. );
  79. VOID WINAPI
  80. ADsFreeAllErrorRecords(
  81. VOID);
  82. LPVOID WINAPI
  83. AllocADsMem(
  84. DWORD cb
  85. );
  86. BOOL WINAPI
  87. FreeADsMem(
  88. LPVOID pMem
  89. );
  90. LPVOID WINAPI
  91. ReallocADsMem(
  92. LPVOID pOldMem,
  93. DWORD cbOld,
  94. DWORD cbNew
  95. );
  96. LPWSTR WINAPI
  97. AllocADsStr(
  98. LPCWSTR pStr
  99. );
  100. BOOL WINAPI
  101. FreeADsStr(
  102. LPWSTR pStr
  103. );
  104. BOOL WINAPI
  105. ReallocADsStr(
  106. LPWSTR *ppStr,
  107. LPWSTR pStr
  108. );
  109. HRESULT WINAPI
  110. ADsEncodeBinaryData (
  111. PBYTE pbSrcData,
  112. DWORD dwSrcLen,
  113. LPWSTR * ppszDestData
  114. );
  115. HRESULT WINAPI
  116. ADsDecodeBinaryData (
  117. LPCWSTR szSrcData,
  118. PBYTE *ppbDestData,
  119. ULONG *pdwDestLen
  120. );
  121. HRESULT WINAPI
  122. PropVariantToAdsType(
  123. VARIANT * pVariant,
  124. DWORD dwNumVariant,
  125. PADSVALUE *ppAdsValues,
  126. PDWORD pdwNumValues
  127. );
  128. HRESULT WINAPI
  129. AdsTypeToPropVariant(
  130. PADSVALUE pAdsValues,
  131. DWORD dwNumValues,
  132. VARIANT * pVariant
  133. );
  134. void WINAPI
  135. AdsFreeAdsValues(
  136. PADSVALUE pAdsValues,
  137. DWORD dwNumValues
  138. );
  139. //
  140. // Helper routines to convert IADsSecurityDescriptor to a binary
  141. // security descriptor and also to convert a binary SD to
  142. // IADsSecurityDescriptor.
  143. //
  144. HRESULT WINAPI
  145. BinarySDToSecurityDescriptor(
  146. PSECURITY_DESCRIPTOR pSecurityDescriptor,
  147. VARIANT *pVarsec,
  148. LPCWSTR pszServerName,
  149. LPCWSTR userName,
  150. LPCWSTR passWord,
  151. DWORD dwFlags
  152. );
  153. HRESULT WINAPI
  154. SecurityDescriptorToBinarySD(
  155. VARIANT vVarSecDes,
  156. PSECURITY_DESCRIPTOR * ppSecurityDescriptor,
  157. PDWORD pdwSDLength,
  158. LPCWSTR pszServerName,
  159. LPCWSTR userName,
  160. LPCWSTR passWord,
  161. DWORD dwFlags
  162. );
  163. #if DBG
  164. extern LIST_ENTRY ADsMemList ;
  165. extern CRITICAL_SECTION ADsMemCritSect ;
  166. VOID InitADsMem(
  167. VOID
  168. ) ;
  169. VOID AssertADsMemLeaks(
  170. VOID
  171. ) ;
  172. VOID
  173. DumpMemoryTracker();
  174. #else
  175. #define InitADsMem()
  176. #define AssertADsMemLeaks()
  177. #define DumpMemoryTracker()
  178. #endif
  179. #ifdef __cplusplus
  180. }
  181. #endif
  182. #endif // _ADSHLP_