Changeset 590 in dev for trunk/ab5.0/jenga/src/common/String.cpp
- Timestamp:
- May 10, 2008, 5:53:17 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/jenga/src/common/String.cpp
r518 r590 25 25 return str; 26 26 } 27 28 std::wstring Jenga::Common::ToWString( const std::string &str ) 29 { 30 int size = MultiByteToWideChar( 31 CP_ACP, 32 0, 33 str.c_str(), static_cast<int>(str.size()) + 1, 34 NULL, 0 ) * 2; 35 36 LPWSTR pwstr = (LPWSTR)malloc( size ); 37 38 MultiByteToWideChar( 39 CP_ACP, 40 0, 41 str.c_str(), static_cast<int>(str.size()) + 1, 42 pwstr, static_cast<int>(str.size()) + 1 ); 43 44 std::wstring wstr( pwstr, str.size() ); 45 46 free( pwstr ); 47 48 return wstr; 49 }
Note:
See TracChangeset
for help on using the changeset viewer.