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.

77 lines
1.5 KiB

  1. /*++
  2. Copyright (c) 1998-2001 Microsoft Corporation
  3. Module Name:
  4. MultiSzHelper.h
  5. Abstract:
  6. Defines the CMultiSzHelper class
  7. Author:
  8. Mohit Srivastava 22-March-01
  9. Revision History:
  10. --*/
  11. #ifndef _multiszhelper_h_
  12. #define _multiszhelper_h_
  13. #include <windows.h>
  14. #include <comutil.h>
  15. #include <wbemprov.h>
  16. #include "schema.h"
  17. #include "WbemServices.h"
  18. #include "MultiSzData.h"
  19. class CMultiSz
  20. {
  21. public:
  22. CMultiSz(
  23. METABASE_PROPERTY* i_pMbp,
  24. CWbemServices* i_pNamespace);
  25. CMultiSz();
  26. virtual ~CMultiSz();
  27. HRESULT ToMetabaseForm(
  28. const VARIANT* i_pvt,
  29. LPWSTR* o_msz,
  30. PDWORD io_pdw);
  31. HRESULT ToWmiForm(
  32. LPCWSTR i_msz,
  33. VARIANT* io_pvt);
  34. private:
  35. HRESULT CreateMultiSzFromSafeArray(
  36. const VARIANT& i_vt,
  37. WCHAR** o_pmsz,
  38. DWORD* io_pdw);
  39. HRESULT MzCat(
  40. WCHAR** io_ppdst,
  41. const WCHAR* i_psz);
  42. HRESULT LoadSafeArrayFromMultiSz(
  43. LPCWSTR i_msz,
  44. VARIANT& io_vt);
  45. HRESULT ParseEntry(
  46. LPCWSTR i_wszEntry,
  47. IWbemClassObject* io_pObj);
  48. HRESULT UnparseEntry(
  49. IWbemClassObject* i_pObj,
  50. BSTR* o_pbstrEntry);
  51. METABASE_PROPERTY* m_pMbp;
  52. CWbemServices* m_pNamespace;
  53. TFormattedMultiSz* m_pFormattedMultiSz;
  54. };
  55. #endif // _multiszhelper_h_