summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2012-01-14 16:54:09 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2012-01-14 16:54:09 (GMT)
commit50590f111b14090eacf536280287d2d1743c6a88 (patch)
treefc18378eba7c109ff4673e28944452620f4aaa3e /PC
parentd61fdc17d38e4ef32505187b81c40c5afd59c3e3 (diff)
downloadcpython-50590f111b14090eacf536280287d2d1743c6a88.zip
cpython-50590f111b14090eacf536280287d2d1743c6a88.tar.gz
cpython-50590f111b14090eacf536280287d2d1743c6a88.tar.bz2
Use GetModuleHandleW to avoid *A functions where possible.
Diffstat (limited to 'PC')
-rw-r--r--PC/frozen_dllmain.c2
-rw-r--r--PC/winreg.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/PC/frozen_dllmain.c b/PC/frozen_dllmain.c
index e1e4eda..0156c50 100644
--- a/PC/frozen_dllmain.c
+++ b/PC/frozen_dllmain.c
@@ -118,7 +118,7 @@ BOOL CallModuleDllMain(char *modName, DWORD dwReason)
BOOL (WINAPI * pfndllmain)(HINSTANCE, DWORD, LPVOID);
char funcName[255];
- HMODULE hmod = GetModuleHandle(NULL);
+ HMODULE hmod = GetModuleHandleW(NULL);
strcpy(funcName, "_DllMain");
strcat(funcName, modName);
strcat(funcName, "@12"); // stdcall convention.
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 @@ PyDeleteKeyEx(PyObject *self, PyObject *args, PyObject *kwargs)
/* 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 @@ PyDisableReflectionKey(PyObject *self, PyObject *args)
/* 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 @@ PyEnableReflectionKey(PyObject *self, PyObject *args)
/* 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 @@ PyQueryReflectionKey(PyObject *self, PyObject *args)
/* 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");