Bug 456449: checked in WinMobile WinCE porting changes from Brad Lassey NSPR_HEAD_20090204
authorwtc%google.com
Wed, 04 Feb 2009 23:50:17 +0000
changeset 4034 356a5eaf87238301b01aeea6372aaed8601b1e33
parent 4033 271db86d9e6518efa31f3f131b83d873aac74ca3
child 4035 17a4c22055691a79cd01e72e8f53bfa8629b4a0d
push idunknown
push userunknown
push dateunknown
bugs456449
Bug 456449: checked in WinMobile WinCE porting changes from Brad Lassey <bugmail@lassey.us>. r=wtc.
pr/src/misc/prsystem.c
--- a/pr/src/misc/prsystem.c
+++ b/pr/src/misc/prsystem.c
@@ -308,17 +308,17 @@ PR_IMPLEMENT(PRUint64) PR_GetPhysicalMem
                            &count);
     if (result == KERN_SUCCESS)
         bytes = hInfo.max_mem;
 
 #elif defined(WIN32)
 
     /* Try to use the newer GlobalMemoryStatusEx API for Windows 2000+. */
     GlobalMemoryStatusExFn globalMemory = (GlobalMemoryStatusExFn) NULL;
-    HMODULE module = GetModuleHandle("kernel32.dll");
+    HMODULE module = GetModuleHandleW(L"kernel32.dll");
 
     if (module) {
         globalMemory = (GlobalMemoryStatusExFn)GetProcAddress(module, "GlobalMemoryStatusEx");
 
         if (globalMemory) {
             PR_MEMORYSTATUSEX memStat;
             memStat.dwLength = sizeof(memStat);