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.

54 lines
1.4 KiB

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. A51Exp.h
  5. Abstract:
  6. Exports the repository into a interchange format that can easily be re-imported.
  7. History:
  8. 08-Dec-2000 paulall Created.
  9. --*/
  10. #define A51_EXPORT_FILE_START_TAG "a51exp1"
  11. #define A51_EXPORT_NAMESPACE_TAG 0x00000001
  12. #define A51_EXPORT_CLASS_TAG 0x00000002
  13. #define A51_EXPORT_INST_TAG 0x00000003
  14. #define A51_EXPORT_CLASS_END_TAG 0x00000005
  15. #define A51_EXPORT_NAMESPACE_END_TAG 0x00000006
  16. #define A51_EXPORT_FILE_END_TAG DWORD(-1)
  17. class CLifeControl;
  18. class A51Export
  19. {
  20. private:
  21. HANDLE m_hFile;
  22. CRepository *m_pRepository;
  23. CLifeControl* m_pControl;
  24. protected:
  25. HRESULT ExportHeader();
  26. HRESULT ExportNamespace(const wchar_t *wszNamespace);
  27. HRESULT ExportClass(CNamespaceHandle *pNs, const wchar_t *wszClassName, _IWmiObject *pClass);
  28. HRESULT ExportInstance(_IWmiObject *pInstance);
  29. HRESULT ExportChildNamespaces(CNamespaceHandle *pNs, const wchar_t *wszNamespace);
  30. HRESULT ExportChildClasses(CNamespaceHandle *pNs, const wchar_t *wszClassName);
  31. HRESULT ExportClassInstances(CNamespaceHandle *pNs, const wchar_t *wszClassName);
  32. HRESULT WriteBufferWithLength(DWORD dwBufferSize, void *pBuffer);
  33. HRESULT WriteObjectType(DWORD dwTag);
  34. HRESULT WriteObjectBlob(_IWmiObject *pObject);
  35. public:
  36. HRESULT Export(const wchar_t *wszFilename, DWORD dwFlags, CRepository *pRepository);
  37. A51Export(CLifeControl* pControl);
  38. ~A51Export();
  39. };