Logo

std::wstring TCHAR_2_wstring const TCHAR *  str  ) 
 

converts a TCHAR (unicode or ansi) into a wide character string

This method uses the bstr_t object to provide character conversion

Parameters:
str - [in] input string, either unicode or MBCS
Returns:
unicode string

Definition at line 41 of file sapi_util.cpp.

00042 {
00043 #if _UNICODE
00044     return std::wstring(str);
00045 #else
00046     bstr_t bst = str;
00047     std::wstring ret = bst;
00048     return (ret);
00049 #endif
00050 }


Copyright (C) 2002-2005 Annosoft LLC. All Rights Reserved.
Visit us at www.annosoft.com