1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 #ifndef _ADSHLP_ 7 #define _ADSHLP_ 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 HRESULT WINAPI ADsGetObject(LPCWSTR lpszPathName,REFIID riid,VOID **ppObject); 14 HRESULT WINAPI ADsBuildEnumerator(IADsContainer *pADsContainer,IEnumVARIANT **ppEnumVariant); 15 HRESULT WINAPI ADsFreeEnumerator(IEnumVARIANT *pEnumVariant); 16 HRESULT WINAPI ADsEnumerateNext(IEnumVARIANT *pEnumVariant,ULONG cElements,VARIANT *pvar,ULONG *pcElementsFetched); 17 HRESULT WINAPI ADsBuildVarArrayStr(LPWSTR *lppPathNames,DWORD dwPathNames,VARIANT *pVar); 18 HRESULT WINAPI ADsBuildVarArrayInt(LPDWORD lpdwObjectTypes,DWORD dwObjectTypes,VARIANT *pVar); 19 HRESULT WINAPI ADsOpenObject(LPCWSTR lpszPathName,LPCWSTR lpszUserName,LPCWSTR lpszPassword,DWORD dwReserved,REFIID riid,void **ppObject); 20 HRESULT WINAPI ADsGetLastError(LPDWORD lpError,LPWSTR lpErrorBuf,DWORD dwErrorBufLen,LPWSTR lpNameBuf,DWORD dwNameBufLen); 21 VOID WINAPI ADsSetLastError(DWORD dwErr,LPCWSTR pszError,LPCWSTR pszProvider); 22 VOID WINAPI ADsFreeAllErrorRecords(VOID); 23 LPVOID WINAPI AllocADsMem(DWORD cb); 24 WINBOOL WINAPI FreeADsMem(LPVOID pMem); 25 LPVOID WINAPI ReallocADsMem(LPVOID pOldMem,DWORD cbOld,DWORD cbNew); 26 LPWSTR WINAPI AllocADsStr(LPCWSTR pStr); 27 WINBOOL WINAPI FreeADsStr(LPWSTR pStr); 28 WINBOOL WINAPI ReallocADsStr(LPWSTR *ppStr,LPWSTR pStr); 29 HRESULT WINAPI ADsEncodeBinaryData(PBYTE pbSrcData,DWORD dwSrcLen,LPWSTR *ppszDestData); 30 HRESULT WINAPI ADsDecodeBinaryData (LPCWSTR szSrcData,PBYTE *ppbDestData,ULONG *pdwDestLen); 31 HRESULT WINAPI PropVariantToAdsType(VARIANT *pVariant,DWORD dwNumVariant,PADSVALUE *ppAdsValues,PDWORD pdwNumValues); 32 HRESULT WINAPI AdsTypeToPropVariant(PADSVALUE pAdsValues,DWORD dwNumValues,VARIANT *pVariant); 33 void WINAPI AdsFreeAdsValues(PADSVALUE pAdsValues,DWORD dwNumValues); 34 HRESULT WINAPI BinarySDToSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor,VARIANT *pVarsec,LPCWSTR pszServerName,LPCWSTR userName,LPCWSTR passWord,DWORD dwFlags); 35 HRESULT WINAPI SecurityDescriptorToBinarySD(VARIANT vVarSecDes,PSECURITY_DESCRIPTOR *ppSecurityDescriptor,PDWORD pdwSDLength,LPCWSTR pszServerName,LPCWSTR userName,LPCWSTR passWord,DWORD dwFlags); 36 37 #define InitADsMem() 38 #define AssertADsMemLeaks() 39 #define DumpMemoryTracker() 40 41 #ifdef __cplusplus 42 } 43 #endif 44 #endif 45