From 48d8e6bf030cbb4f64d8dafcd8587489c088bbf7 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Wed, 19 Mar 2008 13:53:57 +0000 Subject: [PATCH] Use LoadLibrary instead of LoadLibraryA. LoadLibrary can either point to LoadLibraryA or LoadLibraryW depending on the system and build options, so let's use LoadLibrary everywhere for consistency. Also, wrap static argument strings with _T() so that they're automatically in the right format. --- src/misc/mtime.c | 4 ++-- src/misc/threads.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/misc/mtime.c b/src/misc/mtime.c index a06f0211b0..dfd6d73775 100644 --- a/src/misc/mtime.c +++ b/src/misc/mtime.c @@ -225,12 +225,12 @@ mtime_t mdate( void ) (may also be true, for single cores with adaptive CPU frequency and active power management?) */ - HINSTANCE h_Kernel32 = LoadLibraryA("kernel32.dll"); + HINSTANCE h_Kernel32 = LoadLibrary(_T("kernel32.dll")); if(h_Kernel32) { void WINAPI (*pf_GetSystemInfo)(LPSYSTEM_INFO); pf_GetSystemInfo = (void WINAPI (*)(LPSYSTEM_INFO)) - GetProcAddress(h_Kernel32, "GetSystemInfo"); + GetProcAddress(h_Kernel32, _T("GetSystemInfo")); if(pf_GetSystemInfo) { SYSTEM_INFO system_info; diff --git a/src/misc/threads.c b/src/misc/threads.c index e547d0c552..23dcf71191 100644 --- a/src/misc/threads.c +++ b/src/misc/threads.c @@ -174,12 +174,12 @@ int __vlc_threads_init( vlc_object_t *p_this ) HINSTANCE hInstLib; /* We are running on NT/2K/XP, we can use SignalObjectAndWait */ - hInstLib = LoadLibrary( "kernel32" ); + hInstLib = LoadLibrary(_T("kernel32")); if( hInstLib ) { pf_SignalObjectAndWait = (SIGNALOBJECTANDWAIT)GetProcAddress( hInstLib, - "SignalObjectAndWait" ); + _T("SignalObjectAndWait") ); } } -- 2.39.5