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.

72 lines
2.1 KiB

  1. // SFUCommon.h : Declaration of the CSFUCommon
  2. #ifndef __SFUCOMMON_H_
  3. #define __SFUCOMMON_H_
  4. #include "resource.h" // main symbols
  5. #define GROUP 1
  6. #define MEMBER 2
  7. #define NTDOMAIN 3
  8. #define MACHINE 4
  9. typedef struct _STRING_LIST
  10. {
  11. DWORD count;
  12. LPTSTR *strings;
  13. } STRING_LIST, *PSTRING_LIST;
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CSFUCommon
  16. class ATL_NO_VTABLE CSFUCommon :
  17. public CComObjectRootEx<CComSingleThreadModel>,
  18. public CComCoClass<CSFUCommon, &CLSID_SFUCommon>,
  19. public IObjectWithSiteImpl<CSFUCommon>,
  20. public IDispatchImpl<ISFUCommon, &IID_ISFUCommon, &LIBID_DUMMYCOMLib>
  21. {
  22. public:
  23. CSFUCommon()
  24. {
  25. m_slNTDomains.count = 0;
  26. m_slNTDomains.strings = NULL;
  27. LoadNTDomainList();
  28. mode = NTDOMAIN;
  29. }
  30. DECLARE_REGISTRY_RESOURCEID(IDR_SFUCOMMON)
  31. BEGIN_COM_MAP(CSFUCommon)
  32. COM_INTERFACE_ENTRY(ISFUCommon)
  33. COM_INTERFACE_ENTRY(IDispatch)
  34. COM_INTERFACE_ENTRY_IMPL(IObjectWithSite)
  35. END_COM_MAP()
  36. // ISFUCommon
  37. private :
  38. CComBSTR m_bstrNTDomain;
  39. DWORD mode;
  40. public:
  41. STDMETHOD(get_hostName)(BSTR *pszHostNme);
  42. STDMETHOD(IsServiceInstalled)(BSTR bMachine,BSTR bServiceName,BOOL *fValid);
  43. STDMETHOD(moveNext)();
  44. STDMETHOD(moveFirst)();
  45. STDMETHOD(get_NTDomainCount)(/*[out, retval]*/ DWORD *pVal);
  46. STDMETHOD(get_NTDomain)(/*[out, retval]*/ BSTR *pVal);
  47. STDMETHOD(LoadNTDomainList)();
  48. STDMETHOD(get_mode)(/*[out, retval]*/ short *pVal);
  49. STDMETHOD(put_mode)(/*[in]*/ short newVal);
  50. STDMETHOD(ConvertUTCtoLocal)(BSTR bUTCYear, BSTR bUTCMonth,BSTR bUTCDayOfWeek, BSTR bUTCDay,BSTR bUTCHour,BSTR bUTCMinute, BSTR bUTCSecond,BSTR *bLocalDate);
  51. STDMETHOD(IsTrustedDomain)(BSTR bstrDomain, BOOL *fValid);
  52. STDMETHOD(IsValidMachine)(BSTR bstrMachine, BOOL *fValid);
  53. int GetTrustedDomainList(LPTSTR * list, LPTSTR * primary);
  54. void FreeStringList(PSTRING_LIST pList);
  55. DWORD m_dwEnumNTDomainIndex;
  56. STRING_LIST m_slNTDomains;
  57. STDMETHOD(get_machine)(/*[out, retval]*/ BSTR *pVal);
  58. STDMETHOD(put_machine)(/*[in]*/ BSTR newVal);
  59. LPWSTR m_szMachine;
  60. };
  61. #endif //__SFUCOMMON_H_