From 911b066bf87980099b52ad0ee93fed1f13fdc813 Mon Sep 17 00:00:00 2001 From: qmuntal Date: Wed, 6 Mar 2024 14:43:13 +0100 Subject: [PATCH] internal/syscall/windows/registry: append .dll when loading kernel32 Win32 LoadLibrary supports loading a DLL omitting the .dll extension, but it is better to be explicit and include the extension. This is consistent with all other uses of LoadLibrary in the Go standard library. Change-Id: I7349d0a27db5f8ab59061434f37d10918e43b869 Reviewed-on: https://go-review.googlesource.com/c/go/+/569535 LUCI-TryBot-Result: Go LUCI Reviewed-by: Michael Knyszek Reviewed-by: Bryan Mills --- src/internal/syscall/windows/registry/registry_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/internal/syscall/windows/registry/registry_test.go b/src/internal/syscall/windows/registry/registry_test.go index afe7a5d1c3..12eae54a8f 100644 --- a/src/internal/syscall/windows/registry/registry_test.go +++ b/src/internal/syscall/windows/registry/registry_test.go @@ -647,9 +647,9 @@ type DynamicTimezoneinformation struct { } var ( - kernel32DLL = syscall.NewLazyDLL("kernel32") + modkernel32 = syscall.NewLazyDLL("kernel32.dll") - procGetDynamicTimeZoneInformation = kernel32DLL.NewProc("GetDynamicTimeZoneInformation") + procGetDynamicTimeZoneInformation = modkernel32.NewProc("GetDynamicTimeZoneInformation") ) func GetDynamicTimeZoneInformation(dtzi *DynamicTimezoneinformation) (rc uint32, err error) { -- 2.48.1