Trying to run a 32 bit app on a 64 bit machine

Started by
7 comments, last by spek 12 years, 11 months ago
Hey,

I made a game that runs on Windowx XP/Vista and 7, all 32-bit systems. Now we're trying to run it on another Win7 64 bit computer, but it crashes right away with a "runtime 217" error. Now he is not a programmer, and I don't have any 64-bit testing platform so... Houston we got a problem. He ran Dependancy Walker to see if there were DLL's missing. Well, there were:
MF.DLL
MFPLAT.DLL
MFREADWRITE.dll

I added the (32bit) DLL's from my own system to the project. Now it asks for others:
[font="arial, sans-serif"]EVR.DLL
WMDRMSDK.DLL[/font]

I could add these as well, but I suspect another list of missing stuff will appear again. Some more info about the program. It's programmed with Delphi 7, and makes use of several other Delphi7 DLL's. But also Newton (which is a C++ DLL), OpenGL2.x and who knows that else. It's too much to list it all. Maybe I could place the Dependancy Walker image here though, but it's huge.
* It does mention "[font=monospace][size=2]Error: Modules with different CPU types were found.[/font]" btw... guess that's not good :)

Then again, I'm not even sure if these missing DLL's are actually causing this crash. IESHIMS.DLL and IEFRAME.DLL are noticed, but don't seem to be required. At least not on my systems.


* IS there a tool that emulates a 64 bit environment on a 32 bit machine maybe?

Greets,
Rick
Advertisement
If you compiled your application as a 32bits executable, Windows Vista/7 x64 will automatically use it's 32bits library files, and you shouldn't have to do anything. What exactly is your problem, I don't know, but you should check into Delphi specifics cause that's the part I'm less used to.Copying Windows system DLL files manually is a bad idea.
have you installed any required redists ?
im using Windows XP x64 and i can run x86 Software and games fine.
but you should add those files to the SysWOW64 as that is what 32bit apps are reroutered to for system dlls and such.
and the only way i know of to debug a x64 app on a x86 OS is to use something like Visual Studio's Remote Debugger, but i tried to run it and it said something or other and have not bothered with it again.
Good Luck with it.
:):):)

Never say Never, Because Never comes too soon. - ryan20fun

Disclaimer: Each post of mine is intended as an attempt of helping and/or bringing some meaningfull insight to the topic at hand. Due to my nature, my good intentions will not always be plainly visible. I apologise in advance and assure you I mean no harm and do not intend to insult anyone.

Delphi can only compile 32 bit programs, so that part should be fine. When looking through all the modules it points to a lot of Windows DLL's, but mostly with "32" in their names. Same goes for OpengL32.dll and such. I placed the extra required specific DLL's in the project folder;
cg, cggl
Python23
newton
and a couple of my own

All of them are 32 bit DLL's as well. Delphi programs themselves shouldn't require any extra DLL's, like C++ may need the MSVC redist. We didn't place anything in a sysWOW directory (I never used a 64 bit platform), but I guess having the non-Windows required modules inside the .exe folder would do as well, right?

One thing though... when looking through the text file he send from Dependancy Walker running on that 64-bit machine, there is a whole listing of modules where the CPU is tagged as x64:
XMLLite, [font=monospace][size=2]ADVAPI32, [/font][font=monospace][size=2]API-MS-WIN-CORE-xxx, D3D10 (I don't use DirectX...?), and so on. Not sure whether that is normal, or causing problems.[/font]
It's generally bad form to be copying and pasting DLLs around like that. If nothing else, COM DLLs won't be registered, and - as you've discovered - you may miss out on other dependencies and create a mess.

If the development environment requires a runtime and/or other distributable component for to run apps made with it, this should be documented somewhere (try the vendor's website) and there should be a proper installer available for download. Use that, it will get you the right versions you need, any dependencies they might have, avoid conflicts with anything else on your system, and put them in the right location for use by programs. The vendor should also have info available about platform compatibility and anything else you might need to know.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

MFPLAT turns out to be Media Platform. Make sure you install the proper DX runtimes.

WMDRMSDK.DLL is media player. You need to figure out which version you require and make sure it's installed.

EVR.dll seems to be some codec.

As an additional complication, media filters come in 32 and 64 bit versions, so using one in place of other won't work. The problem that can occur is when media player related components have only one or another available, so that 64-bit version may work just fine for all media, but not from your application which creates 32-bit counterparts.

To make this work you'll need to install all of this properly via the required installers, so that everything is registered. Otherwise the DX won't be able to find the proper components. Just copying won't do much for this.

Dealing with media is just a pain.
Well, as said, Delphi7 doesn't require any DLL's or other stuff, asides from Borland Memory Manager. Which I'm not using. Neither do I use COM DLL's. At least not the ones I've added manually. All in all, there are only a few "custom" DLL's I've added, the rest should be somewhere in the Windows directories by default. Yet, a couple of DLL's are missing (the ones from the first post). Then again, I don't know if that would cause this "runtime error 217"... This is a pretty global error message, so I may be misleading all of us by looking into the DLL listings with Dependancy Walker ;) But you got to start somewhere. Debugging a programer via email with another person on a platform I never tried is hell!

Don't know if bad memory sharing can cause this specific area, but I'm using FastMM4 as a memory manager in some (not all) of these DLL's. Maybe this will hurt... But I guess that can only be answered by a Delphi guru with experience on FastMM4...



Maybe I should dig up some smaller Delphi7 (OpenGL) programs and try them first to make sure the basis can run on that computer. Step by step.

@Antheus
I wonder then how those modules slipped in. I'm not using DirectX anywhere, unless it may have slipped in via the GUI functions. It's not only a game, it also carries a lot of Windows forms, buttons, and all that stuff since it's actually an editor program. Well, DW should help me finding that maybe, hopefully I can throw the balast out of the program. Otherwise I fear a long and bumpy ride :)
The first result in google search: How To Fix Runtime 217

Hope that helps!
[size="2"]I like the Walrus best.
I'm lucky, a fellow programmer has Delphi, AND a 64-bit machine. And the same error message hehe. According to him the same DLL's are missing in other 32-bit(game) projects that work on his machine though. So I think it might not be a DLL issue at all....

That 217 error message is quite a global one. The "Fix website" suggest some tools to repair the system, but I think it's really within the code. An old broken Delphi function or something... Well we should have better debugging info now.

Anyway, thanks for all your suggestions!

Rick

This topic is closed to new replies.

Advertisement