Use kernerl32.dll instead of kernelbase.dll for checking conpty support (#356)

This commit is contained in:
bagajjal 2018-11-14 14:49:24 -08:00 committed by GitHub
parent 5faac25142
commit 4666c11e0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -96,7 +96,7 @@ int
is_conpty_supported()
{
wchar_t system32_path[PATH_MAX] = { 0, };
wchar_t kernelbase_dll_path[PATH_MAX] = { 0, };
wchar_t kernel32_dll_path[PATH_MAX] = { 0, };
HMODULE hm_kernelbase = NULL;
static int isConpty = -1;
@ -109,11 +109,11 @@ is_conpty_supported()
goto done;
}
wcscat_s(kernelbase_dll_path, PATH_MAX, system32_path);
wcscat_s(kernelbase_dll_path, PATH_MAX, L"\\KernelBase.dll");
wcscat_s(kernel32_dll_path, PATH_MAX, system32_path);
wcscat_s(kernel32_dll_path, PATH_MAX, L"\\Kernel32.dll");
if ((hm_kernelbase = LoadLibraryW(kernelbase_dll_path)) == NULL) {
error("failed to load kernerlbase dll:%s", kernelbase_dll_path);
if ((hm_kernelbase = LoadLibraryW(kernel32_dll_path)) == NULL) {
error("failed to load kernerlbase dll:%s", kernel32_dll_path);
goto done;
}