From d2f09a02225281fbd30fe068f228ca0f3fd26471 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 18 Jul 2014 00:22:21 -0400 Subject: Fixed all the remaining compiler errors. C conversion works! --- redo/common_windows.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'redo/common_windows.go') diff --git a/redo/common_windows.go b/redo/common_windows.go index 77a2b99..a80ee2e 100644 --- a/redo/common_windows.go +++ b/redo/common_windows.go @@ -22,13 +22,13 @@ func xmissedmsg(purpose *C.char, f *C.char, uMsg C.UINT) { } func toUTF16(s string) C.LPCWSTR { - return C.LPCWSTR(unsafe.Pointer(syscall.StringToUTF16(s))) + return C.LPCWSTR(unsafe.Pointer(syscall.StringToUTF16Ptr(s))) } -func getWindowText(hwnd uintptr) string { +func getWindowText(hwnd C.HWND) string { // WM_GETTEXTLENGTH and WM_GETTEXT return the count /without/ the terminating null character // but WM_GETTEXT expects the buffer size handed to it to /include/ the terminating null character - n := C.getWindowTextLen(hwnd, c_WM_GETTEXTLENGTH, 0, 0) + n := C.getWindowTextLen(hwnd) buf := make([]uint16, int(n + 1)) C.getWindowText(hwnd, C.WPARAM(n), C.LPCWSTR(unsafe.Pointer(&buf[0]))) -- cgit v1.2.3