if(widgetStylesPrinted != true) {document.write('');}var widgetStylesPrinted = true;var content = '
// convert a path from ANSI to UNICODE on windows using std::strings
// useful for converting a boost::filesystem::path into a wpath, until those APIs get merged
std::wstring convertStringToWString( std::string in )
{
if (in.length() == 0 )
{
return std::wstring();
}
UINT wStringLength = MultiByteToWideChar(CP_ACP, 0, in.c_str(), -1, NULL, 0);
if (wStringLength==0)
{
return std::wstring();
}
LPWSTR widestr = new WCHAR[wStringLength];
wStringLength = MultiByteToWideChar( CP_ACP, 0, in.c_str(), -1, widestr, wStringLength );
if ( wStringLength ==0 )
{
delete[] widestr;
return std::wstring();
}
std::wstring returnVal = std::wstring( widestr );
delete[] widestr;
return returnVal;
}