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.
(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;
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") );
}
}