golang使用go.rice打包资源文件在winxp上报错GetFileInformationByHandleEx

go.rice打包试用了一下,很方便,拿到winxp上运行失败

panic: Failed to find GetFileInformationByHandleEx procedure in kernel32.dll: The specified procedure could not be found.

goroutine 1 [running]:
syscall.(*LazyProc).mustFind(0x11c3d8c0)
        d:/go/src/syscall/dll_windows.go:311 +0x42
syscall.(*LazyProc).Addr(0x11c3d8c0, 0xcf00c0)
        d:/go/src/syscall/dll_windows.go:318 +0x21
internal/syscall/windows.GetFileInformationByHandleEx(0x784, 0x9, 0x11c6be8c, 0x8, 0x3, 0x11c1b348)
        d:/go/src/internal/syscall/windows/zsyscall_windows.go:385 +0x27
os.newFileStatFromGetFileInformationByHandle(0x11c4a2f0, 0xd, 0x784, 0x0, 0x11c4a2f0, 0xd)
        d:/go/src/os/types_windows.go:52 +0x135
os.(*File).Stat(0x11c3a660, 0xd, 0x0, 0x0, 0x11c3a660)
        d:/go/src/os/stat_windows.go:55 +0x133
github.com/daaku/go%2ezipexe.OpenCloser(0x11c4a2f0, 0xd, 0x11c4a2f0, 0xd, 0x0, 0x0, 0x0)
        D:/GoWork/src/github.com/daaku/go.zipexe/zipexe.go:26 +0x5e
github.com/GeertJohan/go%2erice.init.0()
        D:/GoWork/src/github.com/GeertJohan/go.rice/appended.go:41 +0x6f

经查在winxp上不支持GetFileInformationByHandleEx,只支持GetFileInformationByHandle,我还想升级一下kernel32.dll来支持这个函数,后来发现是不行的。

最终找到的原因还是go取消了对xp的支持。

Windows XP support was officially removed in Go 1.11 (aug 2018), however things continued to mostly work, apparently. Now we are building with Go 1.12 and things don't.

Windows XP is not supported by the Go runtime, support starts with Windows 7. We (as a project) don't have the resources to support it, sorry about that.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

baikunlun

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值