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.

51 lines
1015 B

  1. // ExtendString.h: interface of the CStringExt class.
  2. //
  3. // Copyright (c) 2001 Microsoft Corporation, All Rights Reserved
  4. //
  5. //////////////////////////////////////////////////////////////////////
  6. #ifndef ___EXTEND_STRING___
  7. #define ___EXTEND_STRING___
  8. #if _MSC_VER >= 1000
  9. #pragma once
  10. #endif _MSC_VER >= 1000
  11. #ifndef _INC_TCHAR
  12. #include <tchar.h>
  13. #endif _INC_TCHAR
  14. #define BUFF_SIZE_EXT 256
  15. class CStringExt
  16. {
  17. public:
  18. // constructor
  19. CStringExt ( DWORD dwSize = BUFF_SIZE_EXT );
  20. CStringExt ( LPCTSTR wsz );
  21. // destructor
  22. virtual ~CStringExt ();
  23. // string manipulation
  24. HRESULT Append ( DWORD dwCount, ... );
  25. HRESULT Copy ( LPCTSTR wsz );
  26. HRESULT Clear ( );
  27. // LPTSTR
  28. inline operator LPTSTR() const
  29. {
  30. return m_wszString;
  31. }
  32. // append strings into string
  33. HRESULT AppendList ( DWORD dwConstantSize, LPCWSTR wszConstant, DWORD dwCount, va_list & argList );
  34. protected:
  35. DWORD m_dwSize;
  36. LPTSTR m_wszString;
  37. };
  38. #endif ___EXTEND_STRING___