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.

64 lines
1.4 KiB

  1. /*++
  2. Copyright (C) 1997-2001 Microsoft Corporation
  3. Module Name:
  4. CBMOFOUT.H
  5. Abstract:
  6. Declares the CBMOFOut class.
  7. History:
  8. a-davj 06-April-97 Created.
  9. --*/
  10. #ifndef __CBMOFOUT__H_
  11. #define __CBMOFOUT__H_
  12. #include "cout.h"
  13. #include <WBEMIDL.H>
  14. //***************************************************************************
  15. //
  16. // CLASS NAME:
  17. //
  18. // CBMOFOut
  19. //
  20. // DESCRIPTION:
  21. //
  22. // Provides an easy way for outputting class information into a binary mof
  23. // file. Users will create an instance, passing the eventual file name, and
  24. // then just add classes.
  25. //
  26. //***************************************************************************
  27. class CBMOFOut {
  28. public:
  29. CBMOFOut(LPTSTR BMOFFileName, PDBG pDbg);
  30. ~CBMOFOut();
  31. DWORD AddClass(CMObject * pObject, BOOL bEmbedded);
  32. BOOL WriteFile();
  33. private:
  34. DWORD AddQualSet(CMoQualifierArray * pQualifierSet);
  35. DWORD AddPropSet(CMObject * pWbemObject);
  36. DWORD AddMethSet(CMObject * pWbemObject);
  37. DWORD AddQualifier(BSTR bstr, VARIANT * pvar, CMoQualifier * pQual);
  38. DWORD AddProp(BSTR bstr, VARIANT * pvar, CMoQualifierArray * pQual,DWORD dwType, CMoProperty * pProp);
  39. DWORD AddVariant(VARIANT * pvar, CMoValue * pVal);
  40. DWORD AddSimpleVariant(VARIANT * pvar, int iIndex, CMoValue * pValue);
  41. COut m_OutBuff;
  42. TCHAR * m_pFile;
  43. WBEM_Binary_MOF m_BinMof;
  44. PDBG m_pDbg;
  45. };
  46. #endif