summaryrefslogtreecommitdiff
path: root/comctl_windows.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-05-25 14:04:03 -0400
committerPietro Gagliardi <[email protected]>2014-05-25 14:04:03 -0400
commit1f94a68432dce90a1780ca2be44f12dc5514c622 (patch)
treed32a48c0a00d73982912159ed4882a6595027a54 /comctl_windows.go
parentd2746b7d2ca606f2212a9bd31e793d0778dad64d (diff)
Fixed issues handling INVALID_HANDLE_VALUE in the Windows constant generator, and built the first build with generated constants!
Diffstat (limited to 'comctl_windows.go')
-rw-r--r--comctl_windows.go3
1 files changed, 2 insertions, 1 deletions
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(