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.

97 lines
2.0 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 2000-2001.
  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. CRSOPObject (const CRSOPObject& rObject);
  24. virtual ~CRSOPObject ();
  25. CString GetRegistryKey () const
  26. {
  27. return m_szRegistryKey;
  28. }
  29. UINT GetPrecedence () const
  30. {
  31. return m_precedence;
  32. }
  33. CString GetValueName () const
  34. {
  35. return m_szValueName;
  36. }
  37. BYTE* GetBlob () const
  38. {
  39. ASSERT (VT_ARRAY == m_vtType);
  40. BYTE* pByte = 0;
  41. if ( VT_ARRAY == m_vtType )
  42. pByte = m_pbyBlob;
  43. return pByte;
  44. }
  45. size_t GetBlobLength () const
  46. {
  47. return m_sizeArray;
  48. }
  49. DWORD GetDWORDValue () const
  50. {
  51. ASSERT (VT_I4 == m_vtType);
  52. if ( VT_I4 == m_vtType )
  53. return m_dwValue;
  54. else
  55. return 0;
  56. }
  57. CString GetPolicyName () const
  58. {
  59. return m_szPolicyName;
  60. }
  61. void GetFileTime (FILETIME& fileTime) const
  62. {
  63. memcpy (&fileTime, &m_fileTime, sizeof (FILETIME));
  64. }
  65. HRESULT GetBSTR (BSTR* pBstr) const;
  66. private:
  67. const CString m_szRegistryKey;
  68. const CString m_szValueName;
  69. const UINT m_precedence;
  70. CString m_szPolicyName;
  71. size_t m_sizeArray;
  72. BSTR m_bstr;
  73. FILETIME m_fileTime;
  74. public:
  75. CIMTYPE m_vtType;
  76. union {
  77. DWORD m_dwValue;
  78. BYTE HUGEP* m_pbyBlob;
  79. };
  80. };
  81. typedef CTypedPtrArray<CObArray,CRSOPObject*> CRSOPObjectArray;
  82. #endif