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.

This commit is contained in:
Pietro Gagliardi 2014-04-28 21:32:49 -04:00
parent b13c86c707
commit 07ecf4dd6b
2 changed files with 2 additions and 3 deletions

View File

@ -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
}

View File

@ -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
}