update clipboard func

master
兔子 9 months ago
parent e56f9d7cc9
commit 9b003f3e9d

@ -86,3 +86,17 @@ func ShellExecuteEx(muzika *SHELLEXECUTEINFOW) error {
}
return nil
}
func DragQueryFile(hDrop HDROP, iFile DWORD, lpszFile *uint16, cch DWORD) (DWORD, error) {
shell32, err := syscall.LoadLibrary("shell32.dll")
if err != nil {
return 0, err
}
defer syscall.FreeLibrary(shell32)
dqf, err := syscall.GetProcAddress(syscall.Handle(shell32), "DragQueryFileW")
if err != nil {
return 0, err
}
r, _, _ := syscall.Syscall6(dqf, 4, uintptr(hDrop), uintptr(iFile), uintptr(unsafe.Pointer(lpszFile)), uintptr(cch), 0, 0)
return DWORD(r), nil
}

Loading…
Cancel
Save