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.

150 lines
2.5 KiB

  1. //+------------------------------------------------------------------------
  2. //
  3. // Class: Common
  4. //
  5. // Purpose: Contains Winnt routines and properties that are common to
  6. // all Winnt objects. Winnt objects get the routines and
  7. // properties through C++ inheritance.
  8. //
  9. //-------------------------------------------------------------------------
  10. #define MAX_DWORD 0xFFFFFFFF
  11. #define SCHEMA_NAME L"Schema"
  12. HRESULT
  13. LoadTypeInfoEntry(
  14. CDispatchMgr * pDispMgr,
  15. REFIID libid,
  16. REFIID iid,
  17. void * pIntf,
  18. DISPID SpecialId
  19. );
  20. HRESULT
  21. MakeUncName(
  22. LPWSTR szSrcBuffer,
  23. LPWSTR szTargBuffer
  24. );
  25. HRESULT
  26. ValidateOutParameter(
  27. BSTR * retval
  28. );
  29. HRESULT
  30. BuildADsPath(
  31. BSTR Parent,
  32. BSTR Name,
  33. BSTR *pADsPath
  34. );
  35. HRESULT
  36. BuildSchemaPath(
  37. BSTR bstrADsPath,
  38. BSTR bstrClass,
  39. BSTR *pSchemaPath
  40. );
  41. HRESULT
  42. BuildADsGuid(
  43. REFCLSID clsid,
  44. BSTR *pADsClass
  45. );
  46. //
  47. // Accessing Well-known object types
  48. //
  49. typedef struct _filters {
  50. WCHAR szObjectName[MAX_PATH];
  51. DWORD dwFilterId;
  52. } FILTERS, *PFILTERS;
  53. extern PFILTERS gpFilters;
  54. extern DWORD gdwMaxFilters;
  55. HRESULT
  56. BuildADsPathFromNDSPath(
  57. LPWSTR szNDSTreeName,
  58. LPWSTR szNDSDNName,
  59. LPWSTR szADsPathName
  60. );
  61. HRESULT
  62. BuildNDSParentPathFromNDSPath(
  63. LPWSTR szNDSPathName,
  64. LPWSTR szNDSParentPathName,
  65. LPWSTR szCommonName
  66. );
  67. HRESULT
  68. BuildNDSPathFromNDSParentPath(
  69. LPWSTR szNDSParentPathName,
  70. LPWSTR szNDSObjectCommonName,
  71. LPWSTR szNDSPathName
  72. );
  73. typedef struct _KEYDATA {
  74. DWORD cTokens;
  75. LPWSTR pTokens[1];
  76. } KEYDATA, *PKEYDATA;
  77. PKEYDATA
  78. CreateTokenList(
  79. LPWSTR pKeyData,
  80. WCHAR ch
  81. );
  82. HRESULT
  83. ConvertSYSTEMTIMEtoDWORD(
  84. CONST SYSTEMTIME *pSystemTime,
  85. DWORD *pdwDate
  86. );
  87. HRESULT
  88. ConvertDWORDtoSYSTEMTIME(
  89. DWORD dwDate,
  90. LPSYSTEMTIME pSystemTime
  91. );
  92. DWORD
  93. ADsNwNdsOpenObject(
  94. IN LPWSTR ObjectDN,
  95. IN CCredentials& Credentials,
  96. OUT HANDLE * lphObject,
  97. OUT LPWSTR lpObjectFullName OPTIONAL,
  98. OUT LPWSTR lpObjectClassName OPTIONAL,
  99. OUT LPDWORD lpdwModificationTime,
  100. OUT LPDWORD lpdwSubordinateCount OPTIONAL
  101. );
  102. //
  103. // Extended error information for NDS
  104. //
  105. HRESULT
  106. CheckAndSetExtendedError(
  107. DWORD dwRetval
  108. );
  109. //
  110. // Copy functionality within the namespace
  111. //
  112. HRESULT
  113. CopyObject(
  114. IN LPWSTR pszSrcADsPath,
  115. IN LPWSTR pszDestContainer,
  116. IN LPWSTR pszCommonName, //optional
  117. IN CCredentials Credentials,
  118. OUT VOID ** ppObject
  119. );