MapViewOfFile fails when arch is 386
Hoto-Cocoa opened this issue · 12 comments
When I used win.IniLoad
, It fails with error: [5 0x05] Access is denied.
, but not with amd64.
I tried to fix this issue but failed.
How can I fix this? INI file size is just 1,536 bytes.
Thanks.
I made two commits to stricten the behavior of MapViewOfFile, but I'm unsure it would make any difference in x86 architectures. The behavior of the C implementation is the same for any architecture.
What's the latest Windows to support x86? I can try downloading an ISO and installing it in a VirtualBox machine to test.
I updated windigo but fail as same. The last Windows that supports x86 is Windows 10. However, just build with GOARCH=386 and running it on x64 Windows also fails as same.
I made a search and there seems to be a number of issues with MapViewOfFile in x86 architectures. As a solution, I simply reimplemented the loading routine in the Ini
, which will not use FileMapped
in x86.
Please let me know if this solves your issue.
It seems new version not published, Should I wait?
The pkg.go.dev may take some time to deploy the documentation, but the code is already commited. You can use it right away.
Thanks for let me know, I just tried update and got new version.
However, now [87 0x57] The parameter is incorrect.
error occurred.
This error is coming from which function call?
It is abst_File.go
file, ReadAll
function, and first call of me.Seek()
.
I found that SetFilePointerEx doesn't work in x86 architectures, so SetFilePointer must be used instead. This is an undocumented behavior, apparently.
Let me know if this works for you.
Now WriteFile: %!w(<nil>)
error occurred. It seems to changes in c71c216 caused make err != nil
always true.
However, the file saved successfully.
I missed an error check, please try again.
It now works perfectly! Thanks a lot for the support.