반응형

BSTR IString::ToBSTR()
{
BSTR BStr;
int iWLength;

iWLength = ::MultiByteToWideChar(CP_ACP, 0, mcpStr, Length(), NULL, NULL);
BStr = ::SysAllocStringLen(NULL, iWLength);
::MultiByteToWideChar(CP_ACP, 0, mcpStr, Length(), BStr, iWLength);

return BStr;
}

반응형

+ Recent posts