summaryrefslogtreecommitdiffstats
path: root/PC/winreg.c
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/winreg.c
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/winreg.c')
-rw-r--r--PC/winreg.c8
1 files changed, 4 insertions, 4 deletions
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");