You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compilation parameters are as follows:
$env:GOARCH="amd64";
$env:GOOS="windows";
$env:GOARCH="386"; # 32
#$env:GOARCH="amd64"; # 64
and the program will be stucked at line 324 in the file clipborad_windows.go:
println("test in read 2")
// try again until open clipboard successed
// will stuck here
for {
r, _, _ = openClipboard.Call()
if r == 0 {
continue
}
break
}
// the following code will not be executed.
println("test in read 3")
The text was updated successfully, but these errors were encountered:
Good point. Is there any specific use case for 32-bit windows? I am 99% sure that this package didn't consider 32-bit windows.
Found the cause of the problem, the user32.dll function openClipboard need a parameter(A handle to the window to be associated with the open clipboard. If this parameter is NULL, the open clipboard is associated with the current task). So maybe you need to get the window handle first, or set the parameter to 0: https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-openclipboard
eg:
// Here you need to get the handle of the clipboard window firstgetOpenClipboardWindow:=user32.MustFindProc("GetOpenClipboardWindow")
for {
r, _, _=getOpenClipboardWindow.Call()
// set the parameter to 0 is also okr, _, _=openClipboard.Call(r)
ifr==0 {
continue
}
break
}
defercloseClipboard.Call()
The compilation parameters are as follows:
$env:GOARCH="amd64";
$env:GOOS="windows";
$env:GOARCH="386"; # 32
#$env:GOARCH="amd64"; # 64
and the program will be stucked at line 324 in the file clipborad_windows.go:
The text was updated successfully, but these errors were encountered: