windows-nt/Source/XPSP1/NT/admin/wmi/wbem/winmgmt/wbemtest/bstring.cpp

36 lines
437 B
C++
Raw Normal View History

2020-09-26 03:20:57 -05:00
/*++
Copyright (C) 1996-2001 Microsoft Corporation
Module Name:
BSTRING.CPP
Abstract:
History:
--*/
#include "precomp.h"
#include "bstring.h"
CBString::CBString(int nSize)
{
m_pString = SysAllocStringLen(NULL, nSize);
}
CBString::CBString(WCHAR* pwszString)
{
m_pString = SysAllocString(pwszString);
}
CBString::~CBString()
{
if(m_pString) {
SysFreeString(m_pString);
m_pString = NULL;
}
}