diff --git a/winsup/utils/regtool.cc b/winsup/utils/regtool.cc index fd2dd0590..e919185ae 100644 --- a/winsup/utils/regtool.cc +++ b/winsup/utils/regtool.cc @@ -16,7 +16,6 @@ details. */ #include #include #include -#include "loadlib.h" #define DEFAULT_KEY_SEPARATOR '\\' @@ -589,10 +588,6 @@ cmd_add () return 0; } -extern "C" { - LONG WINAPI (*regDeleteKeyEx)(HKEY, LPCWSTR, REGSAM, DWORD); -} - int cmd_remove () { @@ -600,13 +595,7 @@ cmd_remove () find_key (2, KEY_ALL_ACCESS); if (wow64) - { - HMODULE mod = LoadLibrary ("advapi32.dll"); - if (mod) - regDeleteKeyEx = (LONG WINAPI (*)(HKEY, LPCWSTR, REGSAM, DWORD)) GetProcAddress (mod, "RegDeleteKeyExW"); - } - if (regDeleteKeyEx) - rv = (*regDeleteKeyEx) (key, value, wow64, 0); + rv = RegDeleteKeyExW (key, value, wow64, 0); else rv = RegDeleteKeyW (key, value); if (rv != ERROR_SUCCESS)