Changeset 1374
- Timestamp:
- 05/28/08 03:58:48 (6 months ago)
- Files:
-
- 1 modified
-
trunk/src/openassetlib/al/al.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/openassetlib/al/al.cpp
r1347 r1374 1 /* -*- mode: C++; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*- */ 1 2 // al.cpp 2 3 // … … 13 14 #include <openassetlib/al/base64_codec.hpp> 14 15 16 // opl 17 #include <openpluginlib/pl/utf8_utils.hpp> 18 namespace pl = olib::openpluginlib; 19 15 20 #if defined( WIN32 ) && !defined( USE_LIBXML2 ) 16 #import <msxml6.dll> 17 #pragma warning( disable : 4290 ) 18 #include <atlbase.h> 21 # import <msxml6.dll> 22 # pragma warning( disable : 4290 ) 23 # ifdef UNICODE 24 pl::string tchar_to_string( const TCHAR* ct ) 25 { 26 // TCHAR should actually be a wchar_t here 27 return pl::to_string( pl::wstring( static_cast< const pl::wstring::value_type* >( ct ) ) ); 28 } 29 # else 30 # error "UNICODE must be defined" 31 # endif 19 32 #else 20 # include <libxml/tree.h>21 # include <libxml/parser.h>33 # include <libxml/tree.h> 34 # include <libxml/parser.h> 22 35 #endif 23 36 … … 441 454 catch(_com_error& e) 442 455 { 443 std::cout << "Exception (_com_error): " << CT2CA(e.ErrorMessage()) << std::endl;456 std::cout << "Exception (_com_error): " << tchar_to_string( e.ErrorMessage() ).c_str() << std::endl; 444 457 return false; 445 458 } … … 531 544 catch(const _com_error& e) 532 545 { 533 std::cout << "Exception (_com_error): " << CT2CA(e.ErrorMessage());546 std::cout << "Exception (_com_error): " << tchar_to_string( e.ErrorMessage() ).c_str() << std::endl; 534 547 return set_ptr(); 535 548 }
