From: qmuntal Date: Wed, 6 Mar 2024 13:43:13 +0000 (+0100) Subject: internal/syscall/windows/registry: append .dll when loading kernel32 X-Git-Tag: go1.23rc1~985 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=911b066bf87980099b52ad0ee93fed1f13fdc813;p=gostls13.git 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 --- 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) {