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.

41 lines
671 B

  1. //***************************************************************************
  2. //
  3. // File:
  4. //
  5. // Module: MS SNMP Provider
  6. //
  7. // Purpose:
  8. //
  9. // Copyright (c) 1997-2001 Microsoft Corporation, All Rights Reserved
  10. //
  11. //***************************************************************************
  12. #include <precomp.h>
  13. #include "bstring.h"
  14. CBString::CBString(int nSize)
  15. {
  16. m_pString = SysAllocStringLen(NULL, nSize);
  17. }
  18. CBString::CBString(WCHAR* pwszString)
  19. {
  20. m_pString = SysAllocString(pwszString);
  21. }
  22. CBString::~CBString()
  23. {
  24. if(m_pString) {
  25. SysFreeString(m_pString);
  26. m_pString = NULL;
  27. }
  28. }