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.

105 lines
2.3 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 2000-2002.
  5. //
  6. // File: RSOPObject.h
  7. //
  8. // Contents:
  9. //
  10. //----------------------------------------------------------------------------
  11. #ifndef __RSOPOBJECT_H_INCLUDED__
  12. #define __RSOPOBJECT_H_INCLUDED__
  13. #include <wbemcli.h>
  14. class CRSOPObject : public CObject
  15. {
  16. public:
  17. CRSOPObject (
  18. const CString& szRegistryKey,
  19. const CString& szValueName,
  20. const CString& szPolicyName,
  21. UINT precedence,
  22. COleVariant& variant,
  23. const CString& szPolicyOID);
  24. CRSOPObject (const CRSOPObject& rObject);
  25. virtual ~CRSOPObject ();
  26. CString GetRegistryKey () const
  27. {
  28. return m_szRegistryKey;
  29. }
  30. UINT GetPrecedence () const
  31. {
  32. return m_precedence;
  33. }
  34. CString GetValueName () const
  35. {
  36. return m_szValueName;
  37. }
  38. CString GetPolicyOID () const
  39. {
  40. return m_szPolicyOID;
  41. }
  42. BYTE* GetBlob () const
  43. {
  44. ASSERT (VT_ARRAY == m_vtType);
  45. BYTE* pByte = 0;
  46. if ( VT_ARRAY == m_vtType )
  47. pByte = m_pbyBlob;
  48. return pByte;
  49. }
  50. size_t GetBlobLength () const
  51. {
  52. return m_sizeArray;
  53. }
  54. DWORD GetDWORDValue () const
  55. {
  56. ASSERT (VT_I4 == m_vtType);
  57. if ( VT_I4 == m_vtType )
  58. return m_dwValue;
  59. else
  60. return 0;
  61. }
  62. CString GetPolicyName () const
  63. {
  64. return m_szPolicyName;
  65. }
  66. void GetFileTime (FILETIME& fileTime) const
  67. {
  68. // security review 2/22/2002 BryanWal ok
  69. memcpy (&fileTime, &m_fileTime, sizeof (fileTime));
  70. }
  71. HRESULT GetBSTR (BSTR* pBstr) const;
  72. private:
  73. const CString m_szRegistryKey;
  74. const CString m_szValueName;
  75. const UINT m_precedence;
  76. CString m_szPolicyName;
  77. size_t m_sizeArray;
  78. BSTR m_bstr;
  79. FILETIME m_fileTime;
  80. const CString m_szPolicyOID;
  81. public:
  82. CIMTYPE m_vtType;
  83. union {
  84. DWORD m_dwValue;
  85. BYTE HUGEP* m_pbyBlob;
  86. };
  87. };
  88. typedef CTypedPtrArray<CObArray,CRSOPObject*> CRSOPObjectArray;
  89. #endif