We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Source code:
package main import ( "fmt" "github.com/lxn/win" "golang.org/x/sys/windows" ) func main() { wrongName := windows.StringToUTF16Ptr("ADFADFASDFSDAFASFD") handle := win.GetModuleHandle(wrongName) if handle == 0 { fmt.Println(win.GetLastError()) // This always returns 0. See https://github.com/golang/go/issues/41220 } }
Expected result: Error code describing 'module not found' (ERROR_MOD_NOT_FOUND, 126)
Actual result: 0
According to golang/go#41220 , windows.GetLastError always returns nil. As the same reason, win.GetLastError always returns 0.
As wrapper provided by this package doesn't handle err return value from syscall.Syscall, the client doesn't know why the function call was failed.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Source code:
Expected result:
Error code describing 'module not found' (ERROR_MOD_NOT_FOUND, 126)
Actual result:
0
According to golang/go#41220 , windows.GetLastError always returns nil. As the same reason, win.GetLastError always returns 0.
As wrapper provided by this package doesn't handle err return value from syscall.Syscall, the client doesn't know why the function call was failed.
The text was updated successfully, but these errors were encountered: