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.

103 lines
2.4 KiB

  1. #ifndef _SYSTEM_HXX
  2. #define _SYSTEM_HXX
  3. //
  4. // Function pointer typedefs
  5. //
  6. typedef BOOLEAN (SEC_ENTRY *GETUSERNAMEEX)(
  7. int NameFormat,
  8. LPWSTR lpNameBuffer,
  9. PULONG nSize);
  10. typedef BOOLEAN (SEC_ENTRY *GETCOMPUTEROBJECTNAME)(
  11. int NameFormat,
  12. LPWSTR lpNameBuffer,
  13. PULONG nSize);
  14. typedef DWORD (WINAPI *DSGETDCNAME)(
  15. IN LPCWSTR ComputerName OPTIONAL,
  16. IN LPCWSTR DomainName OPTIONAL,
  17. IN GUID *DomainGuid OPTIONAL,
  18. IN LPCWSTR SiteName OPTIONAL,
  19. IN ULONG Flags,
  20. OUT PDOMAIN_CONTROLLER_INFOW *DomainControllerInfo);
  21. typedef DWORD (WINAPI *DSENUMERATEDOMAINTRUSTS)(
  22. IN LPWSTR ServerName OPTIONAL,
  23. IN ULONG Flags,
  24. OUT PDS_DOMAIN_TRUSTS *Domains,
  25. OUT PULONG DomainCount
  26. );
  27. //
  28. // Forward declaration
  29. //
  30. class CADSystemInfo;
  31. class CADSystemInfo : INHERIT_TRACKING,
  32. public ISupportErrorInfo,
  33. public IADsADSystemInfo
  34. {
  35. public:
  36. /* IUnknown methods */
  37. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) ;
  38. DECLARE_STD_REFCOUNTING
  39. DECLARE_IDispatch_METHODS
  40. DECLARE_ISupportErrorInfo_METHODS
  41. DECLARE_IADsADSystemInfo_METHODS
  42. CADSystemInfo::CADSystemInfo();
  43. CADSystemInfo::~CADSystemInfo();
  44. static
  45. HRESULT
  46. CADSystemInfo::CreateADSystemInfo(
  47. REFIID riid,
  48. void **ppvObj
  49. );
  50. static
  51. HRESULT
  52. CADSystemInfo::AllocateADSystemInfoObject(
  53. CADSystemInfo ** ppADSystemInfo
  54. );
  55. protected:
  56. HRESULT GetNCHead(LPTSTR szNCName, IADs **pADs );
  57. HRESULT GetRootDSE(IADs **pADs );
  58. HRESULT GetSecur32Handle(HINSTANCE *pHandle);
  59. HRESULT GetfSMORoleOwner(LPTSTR szNCName, BSTR *bstrRoleOwner);
  60. DSGETDCNAME GetDsGetDcName();
  61. DSENUMERATEDOMAINTRUSTS GetDsEnumerateDomainTrusts();
  62. HINSTANCE _hSecur32;
  63. BOOL _Secur32LoadAttempted;
  64. HINSTANCE _hNetApi32;
  65. BOOL _NetApi32LoadAttempted;
  66. CAggregatorDispMgr FAR * _pDispMgr;
  67. };
  68. //
  69. // Class factory
  70. //
  71. class CADSystemInfoCF : public StdClassFactory
  72. {
  73. public:
  74. STDMETHOD(CreateInstance)(IUnknown * pUnkOuter, REFIID iid, LPVOID * ppv);
  75. };
  76. #endif // ifndef _SYSTEM_HXX