Prepare release and bump version numbers to 2.17.0.2
[TortoiseGit.git] / src / TortoisePlink / Windows / utils / load_system32_dll.c
blobea84258fe7751f41594b422d85d6907f8a0720c3
1 /*
2 * Wrapper function to load a DLL out of c:\windows\system32 without
3 * going through the full DLL search path. (Hence no attack is
4 * possible by placing a substitute DLL earlier on that path.)
5 */
7 #include "putty.h"
9 HMODULE load_system32_dll(const char *libname)
11 char *fullpath;
12 HMODULE ret;
14 fullpath = dupcat(get_system_dir(), "\\", libname);
15 ret = LoadLibrary(fullpath);
16 sfree(fullpath);
17 return ret;