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.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/redo/common_windows.go b/redo/common_windows.go
index b1fa0ee..b34a623 100644
--- a/redo/common_windows.go
+++ b/redo/common_windows.go
@@ -21,6 +21,10 @@ func xmissedmsg(purpose *C.char, f *C.char, uMsg C.UINT) {
panic(fmt.Errorf("%s window procedure message %d does not return a value (bug in %s)", C.GoString(purpose), uMsg, C.GoString(f)))
}
+func toUINT16(s string) C.LPCWSTR {
+ return C.LPCWSTR(unsafe.Pointer(syscall.StringToUTF16(s)))
+}
+
func getWindowText(hwnd uintptr) 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