Skip to content

Commit 911b066

Browse files
committed
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 <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> Reviewed-by: Bryan Mills <[email protected]>
1 parent e2459e6 commit 911b066

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/internal/syscall/windows/registry/registry_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,9 +647,9 @@ type DynamicTimezoneinformation struct {
647647
}
648648

649649
var (
650-
kernel32DLL = syscall.NewLazyDLL("kernel32")
650+
modkernel32 = syscall.NewLazyDLL("kernel32.dll")
651651

652-
procGetDynamicTimeZoneInformation = kernel32DLL.NewProc("GetDynamicTimeZoneInformation")
652+
procGetDynamicTimeZoneInformation = modkernel32.NewProc("GetDynamicTimeZoneInformation")
653653
)
654654

655655
func GetDynamicTimeZoneInformation(dtzi *DynamicTimezoneinformation) (rc uint32, err error) {

0 commit comments

Comments
 (0)