diff options
| author | Pietro Gagliardi <[email protected]> | 2014-07-18 00:22:21 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-07-18 00:22:21 -0400 |
| commit | d2f09a02225281fbd30fe068f228ca0f3fd26471 (patch) | |
| tree | fe0148572c6336dd74b2113b3a4fcdc34b3fe4ae /redo/common_windows.go | |
| parent | 7c6fa3b2fd773a31d4c0f8899b96c1f25a669ec1 (diff) | |
Fixed all the remaining compiler errors. C conversion works!
Diffstat (limited to 'redo/common_windows.go')
| -rw-r--r-- | redo/common_windows.go | 6 |
1 files changed, 3 insertions, 3 deletions
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]))) |
