- December 6, 2004
- 2,055
- 318
Actually I'm not sure if this is the right forum....anyways.
I may have found a problem for users running on 64bit Windows Versions, having to do with loading external dll's at runtime. If someone could please confirm (or tell me I'm a complete idiot...anything's good)
Here's the story: When MP executes on 64bit Windows the .NET Framework will attempt to run MP in 64bit. It does so because the Platform target apperently is set to "Any CPU" when compiling. I think what happens is that this tells the Framework on 64bit that it's ok to run this app in native 64bit mode. On x86 platforms obviously it will execute as 32bit. Generally this would be fine. But here's the catch: Every assembly (dll) that is loaded by the app has to have been build toward the SAME platform that the main application runs it. Obviously it can't switch between 32/64 bit mode on the fly.
So if not all loaded assemblies (eg. if a plugin is build specifically as x86 only) MP will throw an exception. That can easily be fixed by the plugin author. Worse is that some native dlls (which mostly are 32 bit) cannot be loaded anymore. An example is the BASS engine. Another exsample (this is what caused me to investigate this) is the MediaInfo library. In short, anything build for 32 bit mode cannot be loaded by MP running on 64bit Windows. The exception details are "BadImageFormatException" "0x8007000B".
I guess the only way to fix this is to explicitely compile MP with x86 as the target platform. This way the framework will always execute MP as a 32bit app enabling it to load all those assemblies.
Thoughts/Comments?
I may have found a problem for users running on 64bit Windows Versions, having to do with loading external dll's at runtime. If someone could please confirm (or tell me I'm a complete idiot...anything's good)
Here's the story: When MP executes on 64bit Windows the .NET Framework will attempt to run MP in 64bit. It does so because the Platform target apperently is set to "Any CPU" when compiling. I think what happens is that this tells the Framework on 64bit that it's ok to run this app in native 64bit mode. On x86 platforms obviously it will execute as 32bit. Generally this would be fine. But here's the catch: Every assembly (dll) that is loaded by the app has to have been build toward the SAME platform that the main application runs it. Obviously it can't switch between 32/64 bit mode on the fly.
So if not all loaded assemblies (eg. if a plugin is build specifically as x86 only) MP will throw an exception. That can easily be fixed by the plugin author. Worse is that some native dlls (which mostly are 32 bit) cannot be loaded anymore. An example is the BASS engine. Another exsample (this is what caused me to investigate this) is the MediaInfo library. In short, anything build for 32 bit mode cannot be loaded by MP running on 64bit Windows. The exception details are "BadImageFormatException" "0x8007000B".

I guess the only way to fix this is to explicitely compile MP with x86 as the target platform. This way the framework will always execute MP as a 32bit app enabling it to load all those assemblies.
Thoughts/Comments?