From 07ecf4dd6b4926bf8d2cba2d80260fa2a71901c7 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 28 Apr 2014 21:32:49 -0400 Subject: [PATCH] Got rid of another TODO about GetLastError() in the same way as earlier (this time in stdfont_windows.go); also fixed capitalization on the earlier one. --- comctl_windows.go | 2 +- stdfont_windows.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/comctl_windows.go b/comctl_windows.go index a52e19c..1d0e221 100644 --- a/comctl_windows.go +++ b/comctl_windows.go @@ -115,7 +115,7 @@ func initCommonControls() (err error) { comctl32 = syscall.NewLazyDLL("comctl32.dll") r1, _, err := comctl32.NewProc("InitCommonControlsEx").Call(uintptr(unsafe.Pointer(&icc))) if r1 == _FALSE { // failure - return fmt.Errorf("error initializing Common Controls (comctl32.dll); windows last error: %v", err) + return fmt.Errorf("error initializing Common Controls (comctl32.dll); Windows last error: %v", err) } return nil } diff --git a/stdfont_windows.go b/stdfont_windows.go index c97e937..6083b7f 100644 --- a/stdfont_windows.go +++ b/stdfont_windows.go @@ -76,10 +76,9 @@ func getStandardWindowFonts() (err error) { } getfont := func(which *_LOGFONT, what string) (_HANDLE, error) { - // TODO does this specify an error? r1, _, err = _createFontIndirect.Call(uintptr(unsafe.Pointer(which))) if r1 == 0 { // failure - return _NULL, fmt.Errorf("error getting %s font", what, err) + return _NULL, fmt.Errorf("error getting %s font; Windows last error: %v", what, err) } return _HANDLE(r1), nil }