From f50f10ed74975da793cbabef1a96078989fe7bd9 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 3 Sep 2013 15:06:47 +0300 Subject: Just use the wide char API and no TCHAR crack, puh-lease Change-Id: I12dc2d9d1c76e43d27b6aaf2ded6444a6aa3d365 --- avmedia/source/vlc/wrapper/SymbolLoader.hxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'avmedia') diff --git a/avmedia/source/vlc/wrapper/SymbolLoader.hxx b/avmedia/source/vlc/wrapper/SymbolLoader.hxx index bf75ac57d0e8..cfc86533e647 100644 --- a/avmedia/source/vlc/wrapper/SymbolLoader.hxx +++ b/avmedia/source/vlc/wrapper/SymbolLoader.hxx @@ -10,7 +10,6 @@ #ifndef _SYMBOL_LOADER_HXX #define _SYMBOL_LOADER_HXX #if defined( WNT ) -# include # include # include #endif @@ -40,16 +39,16 @@ namespace OUString GetVLCPath() { HKEY hKey; - TCHAR arCurrent[MAX_PATH]; + wchar_t arCurrent[MAX_PATH]; DWORD dwType, dwCurrentSize = sizeof( arCurrent ); - if ( ::RegOpenKeyEx( HKEY_LOCAL_MACHINE, _T( "Software\\VideoLAN\\VLC" ), + if ( ::RegOpenKeyExW( HKEY_LOCAL_MACHINE, L"Software\\VideoLAN\\VLC", 0, KEY_READ, &hKey ) == ERROR_SUCCESS ) { - if ( ::RegQueryValueEx( hKey, _T( "InstallDir" ), NULL, &dwType, ( LPBYTE )arCurrent, &dwCurrentSize ) == ERROR_SUCCESS ) + if ( ::RegQueryValueExW( hKey, L"InstallDir", NULL, &dwType, (LPBYTE) arCurrent, &dwCurrentSize ) == ERROR_SUCCESS ) { ::RegCloseKey( hKey ); - return OUString( arCurrent, strlen(arCurrent), RTL_TEXTENCODING_UTF8 ) + "/"; + return OUString( arCurrent, wcslen(arCurrent) ) + "/"; } ::RegCloseKey( hKey ); @@ -58,7 +57,6 @@ namespace } #endif - template bool tryLink( oslModule &aModule, const ApiMap ( &pMap )[N] ) { -- cgit v1.2.3