Skip to content
New issue

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

syscall: LoadDLL() bad error formatting on Windows #12293

ip opened this issue Aug 24, 2015 · 2 comments

syscall: LoadDLL() bad error formatting on Windows #12293

ip opened this issue Aug 24, 2015 · 2 comments


Copy link

ip commented Aug 24, 2015

This is a tiny issue. I use Windows 7 x64. How to reproduce:
echo > corrupted.dll
Create main.go:

package main

import (

func main() {
    _, err := syscall.LoadDLL("./corrupted.dll")
    if err != nil {

It writes: Failed to load ./corrupted.dll: %1 is not a valid Win32 application.

Probably there are more similar errors in other places.

@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Aug 24, 2015
Copy link

Windows returns you ERROR_BAD_EXE_FORMAT. The error message for it ( is "%1 is not a valid Win32 application.". So that is what Go prints.

It is unfortunate, but I don't see how we can improve this situation.


Copy link

ip commented Aug 25, 2015

Yes, sorry, I just wrote same program in C++ and got same output.

@golang golang locked and limited conversation to collaborators Aug 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

4 participants