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.

67 lines
1.7 KiB

  1. /*++
  2. Copyright (c) 2002 Microsoft Corporation
  3. Module Name:
  4. SecurityDatabase.cpp
  5. Abstract:
  6. Definition of CSecurityDatabase interface
  7. SecurityDatabase is a COM interface that allows users to perform
  8. basic operations on SCE security databases such as analysis,
  9. import and export.
  10. Author:
  11. Steven Chan (t-schan) July 2002
  12. --*/
  13. #ifndef __SECURITYDATABASE_H_
  14. #define __SECURITYDATABASE_H_
  15. #include "resource.h" // main symbols
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CSecurityDatabase
  18. class ATL_NO_VTABLE CSecurityDatabase :
  19. public CComObjectRootEx<CComSingleThreadModel>,
  20. public CComCoClass<CSecurityDatabase, &CLSID_SecurityDatabase>,
  21. public IDispatchImpl<ISecurityDatabase, &IID_ISecurityDatabase, &LIBID_SECMANLib>
  22. {
  23. public:
  24. CSecurityDatabase();
  25. DECLARE_REGISTRY_RESOURCEID(IDR_SECURITYDATABASE)
  26. DECLARE_PROTECT_FINAL_CONSTRUCT()
  27. BEGIN_COM_MAP(CSecurityDatabase)
  28. COM_INTERFACE_ENTRY(ISecurityDatabase)
  29. COM_INTERFACE_ENTRY(IDispatch)
  30. END_COM_MAP()
  31. // ISecurityDatabase
  32. public:
  33. STDMETHOD(ExportAnalysisToXML)(BSTR FileName, BSTR ErrorLogFileName);
  34. STDMETHOD(Analyze)();
  35. STDMETHOD(ImportTemplateString)(BSTR TemplateString);
  36. STDMETHOD(ImportTemplateFile)(BSTR FileName);
  37. STDMETHOD(get_MachineName)(/*[out, retval]*/ BSTR *pVal);
  38. STDMETHOD(put_MachineName)(/*[in]*/ BSTR newVal);
  39. STDMETHOD(get_FileName)(/*[out, retval]*/ BSTR *pVal);
  40. STDMETHOD(put_FileName)(/*[in]*/ BSTR newVal);
  41. private:
  42. HMODULE myModuleHandle;
  43. CComBSTR bstrFileName;
  44. void trace(PCWSTR szBuffer, HANDLE hLogFile);
  45. void trace(UINT uID, HANDLE hLogFile);
  46. };
  47. #endif //__SECURITYDATABASE_H_