diff options
| author | Pietro Gagliardi <[email protected]> | 2014-02-11 19:09:10 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-02-11 19:09:10 -0500 |
| commit | ecb2205e02fa68e3c820d2139f6d735ad799a0c2 (patch) | |
| tree | f0a5a76d24ee26b83e127030d39e09f502a16629 /init_windows.go | |
| parent | 09a42e0c344ce4c23918c305f7d27ad44116ba8e (diff) | |
More error corrections; not done yet...
Diffstat (limited to 'init_windows.go')
| -rw-r--r-- | init_windows.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/init_windows.go b/init_windows.go index a4a0d7f..554fe23 100644 --- a/init_windows.go +++ b/init_windows.go @@ -8,24 +8,24 @@ import ( ) var ( - hInstance HANDLE + hInstance _HANDLE nCmdShow int // TODO font ) // TODO is this trick documented in MSDN? func getWinMainhInstance() (err error) { - r1, _, err := kernel32.NewProc("GetModuleHandleW").Call(uintptr(NULL)) + r1, _, err := kernel32.NewProc("GetModuleHandleW").Call(uintptr(_NULL)) if r1 == 0 { // failure return err } - hInstance = HANDLE(r1) + hInstance = _HANDLE(r1) return nil } -// TODO this is what MinGW-w64's crt (svn revision xxx) does; is it best? is any of this documented anywhere on MSDN? +// TODO this is what MinGW-w64's crt (svn revision TODO) does; is it best? is any of this documented anywhere on MSDN? // TODO I highly doubt Windows API functions ever not fail, so figure out what to do should an error actually occur -func getWinMainnCmdShow() (nCmdShow int, err error) { +func getWinMainnCmdShow() (err error) { var info struct { cb uint32 lpReserved *uint16 @@ -42,9 +42,9 @@ func getWinMainnCmdShow() (nCmdShow int, err error) { wShowWindow uint16 cbReserved2 uint16 lpReserved2 *byte - hStdInput HANDLE - hStdOutput HANDLE - hStdError HANDLE + hStdInput _HANDLE + hStdOutput _HANDLE + hStdError _HANDLE } const _STARTF_USESHOWWINDOW = 0x00000001 |
