[Haskell-cafe] Same code, system, but different arch using Win32 for reading registry.
allbery.b at gmail.com
Fri Apr 7 18:09:54 UTC 2017
On Fri, Apr 7, 2017 at 3:51 PM, Akos Marton <makos999 at gmail.com> wrote:
> *me.exe: RegOpenKey: invalid argument (The system cannot find the file
> That would be fine, however the key does exists. When same code, same
> system, but the .exe built to be x64 it runs like a charm.
My guess is that the FFI call has an incorrect type somewhere and therefore
Another thing which convoluted in the issue...
> The function, *getSystemInfo :: IO SYSTEM_INFO, *can read out the
> underlying architecture. When compiled on x86 and run on x64 it would tell
> me: "I am running on x86". That's failure.
You can blame Windows for that one: if you run an x86 binary on x86_64, it
launches the WoW subsystem emulating an x86 processor, so you will get the
emulated processor reported back. There may be a different API to get the
actual host --- but given that WoW exists to minimize incompatibilities for
x86 software, it is likely well hidden if it exists at all.
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe