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 <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
This commit is contained in:
qmuntal 2024-03-06 14:43:13 +01:00 committed by Quim Muntal
parent e2459e627f
commit 911b066bf8

View file

@ -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) {