]> git.sesse.net Git - vlc/commitdiff
Use LoadLibrary instead of LoadLibraryA.
authorSam Hocevar <sam@zoy.org>
Wed, 19 Mar 2008 13:53:57 +0000 (13:53 +0000)
committerSam Hocevar <sam@zoy.org>
Wed, 19 Mar 2008 15:51:50 +0000 (15:51 +0000)
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
src/misc/threads.c

index a06f0211b02a9d8e82a87c1e8af0bbca7bd1a692..dfd6d73775a11bb8425e5c791753477fe4372bf9 100644 (file)
@@ -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;
index e547d0c5523c210a08468680857ff9d7deab2a02..23dcf71191b2283df31413226f387554f6e0b945 100644 (file)
@@ -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") );
             }
         }