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.

55 lines
1.6 KiB

  1. //
  2. // MODULE: VariantBuilder.h
  3. //
  4. // PURPOSE: interface for the CVariantBuilder class. Allows us to construct
  5. // a pair of arrays for the name-value pairs to be passed to RunQuery. This lets
  6. // JScript sanely use a system that was mostly designed for VB Script.
  7. //
  8. // PROJECT: Troubleshooter 99
  9. //
  10. // COMPANY: Saltmine Creative, Inc. (206)-284-7511 [email protected]
  11. //
  12. // AUTHOR: Joe Mabel
  13. //
  14. // ORIGINAL DATE: 02.01.99
  15. //
  16. // NOTES:
  17. // Implementation of CTSHOOTCtrl
  18. //
  19. // Version Date By Comments
  20. //--------------------------------------------------------------------
  21. // V3.1 02.01.99 JM
  22. #if !defined(AFX_VARIANTBUILDER_H__901D987E_BA1C_11D2_9663_00C04FC22ADD__INCLUDED_)
  23. #define AFX_VARIANTBUILDER_H__901D987E_BA1C_11D2_9663_00C04FC22ADD__INCLUDED_
  24. #if _MSC_VER > 1000
  25. #pragma once
  26. #endif // _MSC_VER > 1000
  27. class CVariantBuilder
  28. {
  29. private:
  30. VARIANT m_varCommands;
  31. VARIANT m_varValues;
  32. VARIANT m_varCommandsWrap;
  33. VARIANT m_varValuesWrap;
  34. SAFEARRAY *m_psafearrayCmds;
  35. SAFEARRAY *m_psafearrayVals;
  36. long m_cElements;
  37. enum {k_cMaxElements = 100};// safely large: allows this many calls to CVariantBuilder::SetPair()
  38. VARIANT m_pvarCmd[k_cMaxElements];
  39. VARIANT m_pvarVal[k_cMaxElements];
  40. public:
  41. CVariantBuilder();
  42. ~CVariantBuilder();
  43. void SetPair(BSTR bstrCmd, BSTR bstrVal);
  44. const VARIANT& GetCommands() const {return m_varCommandsWrap;}
  45. const VARIANT& GetValues() const {return m_varValuesWrap;}
  46. long GetSize() const {return m_cElements;}
  47. };
  48. #endif // !defined(AFX_VARIANTBUILDER_H__901D987E_BA1C_11D2_9663_00C04FC22ADD__INCLUDED_)