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.

92 lines
2.4 KiB

  1. // database.h: interface for the CSecurityDatabase class.
  2. //
  3. // Copyright (c)1997-1999 Microsoft Corporation
  4. //
  5. //////////////////////////////////////////////////////////////////////
  6. #if !defined(AFX_DATABASE_H__BD7570F7_9F0E_4C6B_B525_E078691B6D0E__INCLUDED_)
  7. #define AFX_DATABASE_H__BD7570F7_9F0E_4C6B_B525_E078691B6D0E__INCLUDED_
  8. #if _MSC_VER >= 1000
  9. #pragma once
  10. #endif // _MSC_VER >= 1000
  11. #include "GenericClass.h"
  12. #define DMTFLEN 25
  13. //
  14. // helper
  15. //
  16. HRESULT GetDMTFTime(SYSTEMTIME t_SysTime, BSTR *bstrOut);
  17. /*
  18. Class description
  19. Naming:
  20. CSecurityDatabase.
  21. Base class:
  22. CGenericClass.
  23. Purpose of class:
  24. (1) Implement Sce_Database WMI class.
  25. Design:
  26. (1) Almost trivial other than implementing necessary method as a concrete class
  27. Use:
  28. (1) Almost never used directly. Always through the common interface defined by
  29. CGenericClass.
  30. Original note:
  31. In V1, this class is provided strictly for query support.
  32. To create or otherwise work with data in a database, use one of the
  33. methods in the SCE_Operation class.
  34. */
  35. class CSecurityDatabase : public CGenericClass
  36. {
  37. public:
  38. CSecurityDatabase(
  39. ISceKeyChain *pKeyChain,
  40. IWbemServices *pNamespace,
  41. IWbemContext *pCtx = NULL
  42. );
  43. virtual ~CSecurityDatabase();
  44. virtual HRESULT PutInst(
  45. IWbemClassObject *pInst,
  46. IWbemObjectSink *pHandler,
  47. IWbemContext *pCtx
  48. )
  49. {
  50. return WBEM_E_NOT_SUPPORTED;
  51. }
  52. virtual HRESULT CreateObject(
  53. IWbemObjectSink *pHandler,
  54. ACTIONTYPE atAction
  55. );
  56. private:
  57. HRESULT ConstructInstance(
  58. IWbemObjectSink *pHandler,
  59. LPCWSTR wszDatabaseName,
  60. LPCWSTR wszLogDatabasePath
  61. );
  62. };
  63. #endif // !defined(AFX_DATABASE_H__BD7570F7_9F0E_4C6B_B525_E078691B6D0E__INCLUDED_)