diff options
Diffstat (limited to 'win/tclWinReg.c')
-rw-r--r-- | win/tclWinReg.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/win/tclWinReg.c b/win/tclWinReg.c index 5f7fd31..de48b9b 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -1197,14 +1197,12 @@ RecursiveDeleteKey( */ if (mode && !checkExProc) { - HINSTANCE dllH; + HMODULE handle; checkExProc = 1; - dllH = LoadLibrary(TEXT("advapi32.dll")); - if (dllH) { - regDeleteKeyExProc = (FARPROC) - GetProcAddress(dllH, "RegDeleteKeyExW"); - } + handle = GetModuleHandle(TEXT("ADVAPI32")); + regDeleteKeyExProc = (FARPROC) + GetProcAddress(handle, "RegDeleteKeyExW"); } if (mode && regDeleteKeyExProc) { result = regDeleteKeyExProc(startKey, keyName, mode, 0); |