Use GetModuleHandleW to avoid *A functions where possible.
diff --git a/PC/winreg.c b/PC/winreg.c
index 56bda5c..451ced2 100644
--- a/PC/winreg.c
+++ b/PC/winreg.c
@@ -1066,7 +1066,7 @@
/* Only available on 64bit platforms, so we must load it
dynamically. */
- hMod = GetModuleHandle("advapi32.dll");
+ hMod = GetModuleHandleW(L"advapi32.dll");
if (hMod)
pfn = (RDKEFunc)GetProcAddress(hMod,
"RegDeleteKeyExW");
@@ -1590,7 +1590,7 @@
/* Only available on 64bit platforms, so we must load it
dynamically.*/
- hMod = GetModuleHandle("advapi32.dll");
+ hMod = GetModuleHandleW(L"advapi32.dll");
if (hMod)
pfn = (RDRKFunc)GetProcAddress(hMod,
"RegDisableReflectionKey");
@@ -1626,7 +1626,7 @@
/* Only available on 64bit platforms, so we must load it
dynamically.*/
- hMod = GetModuleHandle("advapi32.dll");
+ hMod = GetModuleHandleW(L"advapi32.dll");
if (hMod)
pfn = (RERKFunc)GetProcAddress(hMod,
"RegEnableReflectionKey");
@@ -1663,7 +1663,7 @@
/* Only available on 64bit platforms, so we must load it
dynamically.*/
- hMod = GetModuleHandle("advapi32.dll");
+ hMod = GetModuleHandleW(L"advapi32.dll");
if (hMod)
pfn = (RQRKFunc)GetProcAddress(hMod,
"RegQueryReflectionKey");