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.

35 lines
437 B

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. BSTRING.CPP
  5. Abstract:
  6. History:
  7. --*/
  8. #include "precomp.h"
  9. #include "bstring.h"
  10. CBString::CBString(int nSize)
  11. {
  12. m_pString = SysAllocStringLen(NULL, nSize);
  13. }
  14. CBString::CBString(WCHAR* pwszString)
  15. {
  16. m_pString = SysAllocString(pwszString);
  17. }
  18. CBString::~CBString()
  19. {
  20. if(m_pString) {
  21. SysFreeString(m_pString);
  22. m_pString = NULL;
  23. }
  24. }