mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Use GetModuleHandleW to avoid *A functions where possible.
This commit is contained in:
parent
d61fdc17d3
commit
50590f111b
3 changed files with 8 additions and 8 deletions
|
@ -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.
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue