diff options
| author | Pietro Gagliardi <[email protected]> | 2014-07-17 23:14:22 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-07-17 23:14:22 -0400 |
| commit | d8f302f15728ab6222310657e508cf4480080c79 (patch) | |
| tree | de78f85b7a53f752197603f8401fe2f5f5c60640 /redo/common_windows.go | |
| parent | 0dc1538002b22064457f6fe778dab15b81944882 (diff) | |
Some Unicode-related fixups and additions in the new Windows code.
Diffstat (limited to 'redo/common_windows.go')
| -rw-r--r-- | redo/common_windows.go | 4 |
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 |
