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.

47 lines
929 B

  1. #ifndef COMMONUTILS_H
  2. #define COMMONUTILS_H
  3. #include "stdafx.h"
  4. #include <comdef.h>
  5. #include <vector>
  6. using namespace std;
  7. class CommonUtils
  8. {
  9. public:
  10. // converts the CIPAddressCtrl embedded ip into
  11. // dotted decimal string representation.
  12. static
  13. _bstr_t
  14. getCIPAddressCtrlString( CIPAddressCtrl& ip );
  15. // fills the CIPAddressCtrl with the dotted decimal
  16. // string representation.
  17. static
  18. void
  19. fillCIPAddressCtrlString( CIPAddressCtrl& ip,
  20. const _bstr_t& ipAdddress );
  21. static
  22. void
  23. getVectorFromSafeArray( SAFEARRAY*& stringArray,
  24. vector<_bstr_t>& strings );
  25. static
  26. void
  27. getSafeArrayFromVector( const vector<_bstr_t>& strings,
  28. SAFEARRAY*& stringArray
  29. );
  30. private:
  31. enum
  32. {
  33. BUF_SIZE = 1000,
  34. };
  35. };
  36. #endif