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.

93 lines
2.1 KiB

  1. // #include "ole2int.h"
  2. #include "nt.h"
  3. #include "ntrtl.h"
  4. #include "nturtl.h"
  5. #include "windows.h"
  6. #include "ole2.h"
  7. #include <stdio.h>
  8. #include <malloc.h>
  9. #include <rpc.h>
  10. #include <userenv.h>
  11. //
  12. // Active Ds includes
  13. //
  14. #include "activeds.h"
  15. #include "adsi.h"
  16. #include "netevent.h"
  17. #define EXIT_ON_NOMEM(p) \
  18. if (!(p)) { \
  19. hr = E_OUT_OF_MEMORY; \
  20. goto Error_Cleanup; \
  21. }
  22. #define ERROR_ON_FAILURE(hr) \
  23. if (FAILED(hr)) { \
  24. goto Error_Cleanup; \
  25. }
  26. #define RETURN_ON_FAILURE(hr) \
  27. if (FAILED(hr)) { \
  28. return hr; \
  29. }
  30. extern DWORD gDebugLog;
  31. extern DWORD gDebugOut;
  32. extern DWORD gDebugEventLog;
  33. extern DWORD gDebug;
  34. #define LOGFILE L"\\cstore.log"
  35. #define DIAGNOSTICS_KEY \
  36. L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Diagnostics"
  37. #define DIAGNOSTICS_APPDEPLOYMENT_VALUE \
  38. L"RunDiagnosticLoggingApplicationDeployment"
  39. void LogMessage(WCHAR *Msg);
  40. void CSDbgPrint(WCHAR *Format, ...);
  41. void ReportEventCS(HRESULT ErrorCode, HRESULT ExtendedErrorCode, LPOLESTR szContainerName);
  42. #define CSDBGPrint(Msg) \
  43. if (gDebug) \
  44. CSDbgPrint Msg; \
  45. else \
  46. \
  47. // private header exported from adsldpc.dll
  48. HRESULT
  49. BuildADsPathFromParent(
  50. LPWSTR Parent,
  51. LPWSTR Name,
  52. LPWSTR *ppszADsPath
  53. );
  54. HRESULT
  55. BuildADsParentPath(
  56. LPWSTR szBuffer,
  57. LPWSTR *ppszParent,
  58. LPWSTR *ppszCommonName
  59. );
  60. HRESULT
  61. ADsEncodeBinaryData (
  62. PBYTE pbSrcData,
  63. DWORD dwSrcLen,
  64. LPWSTR * ppszDestData
  65. );
  66. /*
  67. HRESULT ParseLdapName(WCHAR *szName, DWORD *pServerNameLen, BOOL *pX500Name);
  68. */
  69. #include "dsprop.hxx"
  70. #include "qry.hxx"