Fixed Windows build. More TODOs. Still not working...

This commit is contained in:
Pietro Gagliardi 2015-02-18 00:43:41 -05:00
parent 366460a46e
commit 847e9bfd2c
2 changed files with 3 additions and 0 deletions

View File

@ -48,6 +48,7 @@ func finishNewTable(b *tablebase, ty reflect.Type) Table {
} }
colname := toUTF16(ty.Field(i).Name) colname := toUTF16(ty.Field(i).Name)
C.SendMessageW(t.hwnd, C.tableAddColumn, coltype, C.LPARAM(uintptr(unsafe.Pointer(colname)))) C.SendMessageW(t.hwnd, C.tableAddColumn, coltype, C.LPARAM(uintptr(unsafe.Pointer(colname))))
// TODO free colname
} }
t.colcount = C.int(ty.NumField()) t.colcount = C.int(ty.NumField())
return t return t

View File

@ -5,6 +5,8 @@
#define STRICT_TYPED_ITEMIDS #define STRICT_TYPED_ITEMIDS
#define CINTERFACE #define CINTERFACE
#define COBJMACROS #define COBJMACROS
// see https://github.com/golang/go/issues/9916#issuecomment-74812211
#define INITGUID
// get Windows version right; right now Windows XP // get Windows version right; right now Windows XP
#define WINVER 0x0501 #define WINVER 0x0501
#define _WIN32_WINNT 0x0501 #define _WIN32_WINNT 0x0501