From 1f94a68432dce90a1780ca2be44f12dc5514c622 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 25 May 2014 14:04:03 -0400 Subject: Fixed issues handling INVALID_HANDLE_VALUE in the Windows constant generator, and built the first build with generated constants! --- comctl_windows.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'comctl_windows.go') diff --git a/comctl_windows.go b/comctl_windows.go index 6b61cef..2830e3c 100644 --- a/comctl_windows.go +++ b/comctl_windows.go @@ -59,7 +59,8 @@ func forceCommonControls6() (err error) { actctx.lpSource = syscall.StringToUTF16Ptr(filename) r1, _, err := _createActCtx.Call(uintptr(unsafe.Pointer(&actctx))) - if r1 == negConst(_INVALID_HANDLE_VALUE) { // failure + // don't negConst() INVALID_HANDLE_VALUE; windowsconstgen was given a pointer by windows.h, and pointers are unsigned, so converting it back to signed doesn't work + if r1 == _INVALID_HANDLE_VALUE { // failure return fmt.Errorf("error creating activation context for synthesized manifest file: %v", err) } r1, _, err = _activateActCtx.Call( -- cgit v1.2.3