@@ -17,8 +17,10 @@ import (
17
17
"unsafe"
18
18
)
19
19
20
- type Handle uintptr
21
- type HWND uintptr
20
+ type (
21
+ Handle uintptr
22
+ HWND uintptr
23
+ )
22
24
23
25
const (
24
26
InvalidHandle = ^ Handle (0 )
@@ -211,6 +213,8 @@ func NewCallbackCDecl(fn interface{}) uintptr {
211
213
//sys OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (handle Handle, err error)
212
214
//sys ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) [failretval<=32] = shell32.ShellExecuteW
213
215
//sys GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) = user32.GetWindowThreadProcessId
216
+ //sys GetKeyboardLayout(tid uint32) (hkl Handle) = user32.GetKeyboardLayout
217
+ //sys ToUnicodeEx(vkey uint32, scancode uint32, keystate *byte, pwszBuff *uint16, cchBuff int32, flags uint32, hkl Handle) (ret int32) = user32.ToUnicodeEx
214
218
//sys GetShellWindow() (shellWindow HWND) = user32.GetShellWindow
215
219
//sys MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) [failretval==0] = user32.MessageBoxW
216
220
//sys ExitWindowsEx(flags uint32, reason uint32) (err error) = user32.ExitWindowsEx
@@ -1357,9 +1361,11 @@ func SetsockoptLinger(fd Handle, level, opt int, l *Linger) (err error) {
1357
1361
func SetsockoptInet4Addr (fd Handle , level , opt int , value [4 ]byte ) (err error ) {
1358
1362
return Setsockopt (fd , int32 (level ), int32 (opt ), (* byte )(unsafe .Pointer (& value [0 ])), 4 )
1359
1363
}
1364
+
1360
1365
func SetsockoptIPMreq (fd Handle , level , opt int , mreq * IPMreq ) (err error ) {
1361
1366
return Setsockopt (fd , int32 (level ), int32 (opt ), (* byte )(unsafe .Pointer (mreq )), int32 (unsafe .Sizeof (* mreq )))
1362
1367
}
1368
+
1363
1369
func SetsockoptIPv6Mreq (fd Handle , level , opt int , mreq * IPv6Mreq ) (err error ) {
1364
1370
return syscall .EWINDOWS
1365
1371
}
0 commit comments