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.

58 lines
1019 B

  1. //
  2. // util.h, some common utility classes
  3. //
  4. #include "SSRTE.h"
  5. #pragma once
  6. class CSafeArray
  7. {
  8. public:
  9. CSafeArray( IN VARIANT * pVal);
  10. ULONG GetSize()
  11. {
  12. return m_ulSize;
  13. }
  14. HRESULT GetElement (
  15. IN REFIID guid,
  16. IN ULONG ulIndex,
  17. OUT IUnknown ** ppUnk
  18. );
  19. HRESULT GetElement (
  20. IN ULONG ulIndex,
  21. IN VARTYPE vt,
  22. OUT VARIANT * pulVal
  23. );
  24. HRESULT GetElement (
  25. IN ULONG ulIndex,
  26. OUT VARIANT * pulVal
  27. );
  28. //
  29. // we don't want anyone (include self) to be able to do an assignment
  30. // or invoking copy constructor.
  31. //
  32. CSafeArray (const CSafeArray& );
  33. void operator = (const CSafeArray& );
  34. private:
  35. SAFEARRAY * m_pSA;
  36. VARIANT * m_pVal;
  37. ULONG m_ulSize;
  38. bool m_bValidArray;
  39. };