|
|
|
@ -322,6 +322,23 @@ func SetClipboardViewer(hWndNewViewer HWND) (HWND, error) {
|
|
|
|
|
return HWND(r), nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func GetClipboardSequenceNumber() (DWORD, error) {
|
|
|
|
|
user32, err := syscall.LoadLibrary("user32.dll")
|
|
|
|
|
if err != nil {
|
|
|
|
|
return 0, errors.New("Can't Load User32 API")
|
|
|
|
|
}
|
|
|
|
|
defer syscall.FreeLibrary(user32)
|
|
|
|
|
gcsn, err := syscall.GetProcAddress(syscall.Handle(user32), "GetClipboardSequenceNumber")
|
|
|
|
|
if err != nil {
|
|
|
|
|
return 0, errors.New("Can't Load GetClipboardSequenceNumber API")
|
|
|
|
|
}
|
|
|
|
|
r, _, errno := syscall.Syscall(gcsn, 0, 0, 0, 0)
|
|
|
|
|
if r == 0 {
|
|
|
|
|
return 0, error(errno)
|
|
|
|
|
}
|
|
|
|
|
return DWORD(r), nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func CreateWindowEx(dwExStyle DWORD, lpClassName, lpWindowName string, dwStyle DWORD, x, y, nWidth, nHeight int, hWndParent HWND, hMenu HMENU, hInstance HINSTANCE, lpParam unsafe.Pointer) (HWND, error) {
|
|
|
|
|
user32, err := syscall.LoadLibrary("user32.dll")
|
|
|
|
|
if err != nil {
|
|
|
|
|