summaryrefslogtreecommitdiff
path: root/redo/common_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'redo/common_windows.go')
-rw-r--r--redo/common_windows.go6
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])))