Speed up uv_pty_resize even more

kernel32.dll will always be loaded, so we can just retrieve its handle
instead of loading it.
This commit is contained in:
Patrick Böker 2026-01-03 23:48:39 +01:00
parent 745853459e
commit 6645b3b4ac

View File

@ -941,8 +941,7 @@ int uv_pty_resize(uv_process_t* process,
return UV_EINVAL;
if (pfnResize == NULL) {
HANDLE hLibrary = LoadLibraryExW(L"kernel32.dll", 0, 0);
// Error loading kernel32.dll: (error code %i)
HANDLE hLibrary = GetModuleHandleW(L"kernel32.dll");
if (!hLibrary)
return uv_translate_sys_error(GetLastError());