diff options
author | Alexander Neumann <alexander.neumann@picos-software.com> | 2019-05-08 16:46:31 +0200 |
---|---|---|
committer | Alexander Neumann <alexander.neumann@picos-software.com> | 2019-05-08 16:46:31 +0200 |
commit | 128b91335ca07c8e185b67c99eee1fce03642def (patch) | |
tree | f95b6da7a2d19074518117c9239d51d244fad0ae | |
parent | Fix for previous commit (diff) | |
download | wireguard-windows-128b91335ca07c8e185b67c99eee1fce03642def.tar.xz wireguard-windows-128b91335ca07c8e185b67c99eee1fce03642def.zip |
Add GetIconInfo
-rw-r--r-- | user32.go | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -1661,6 +1661,7 @@ var ( getDpiForWindow *windows.LazyProc getFocus *windows.LazyProc getForegroundWindow *windows.LazyProc + getIconInfo *windows.LazyProc getKeyState *windows.LazyProc getMenuInfo *windows.LazyProc getMessage *windows.LazyProc @@ -1793,6 +1794,7 @@ func init() { getDpiForWindow = libuser32.NewProc("GetDpiForWindow") getFocus = libuser32.NewProc("GetFocus") getForegroundWindow = libuser32.NewProc("GetForegroundWindow") + getIconInfo = libuser32.NewProc("GetIconInfo") getKeyState = libuser32.NewProc("GetKeyState") getMenuInfo = libuser32.NewProc("GetMenuInfo") getMessage = libuser32.NewProc("GetMessageW") @@ -2357,6 +2359,15 @@ func GetForegroundWindow() HWND { return HWND(ret) } +func GetIconInfo(hicon HICON, piconinfo *ICONINFO) bool { + ret, _, _ := syscall.Syscall(getIconInfo.Addr(), 2, + uintptr(hicon), + uintptr(unsafe.Pointer(piconinfo)), + 0) + + return ret != 0 +} + func GetKeyState(nVirtKey int32) int16 { ret, _, _ := syscall.Syscall(getKeyState.Addr(), 1, uintptr(nVirtKey), |