P3D v4 Cannot export P3D4 MDL or BGL

That depends on the SDK you are using and if the xtomdl version is 32 or 64 bit.

I tried to collect some info here:

I installed Microsoft Visual C++ 2013 Redistributable (x64) and now the first part of Tom Gobson's tutorial(chapter 2-4) works OK.

My setup is now:
ModelConverterX V 33818d9c DEV 2019-05-04
Windows 10 home at ASUS laptop
Microsoft Visual C++ 2005 Redistributable
Microsoft Visual C++ 2008 Redistributable - x64
Microsoft Visual C++ 2008 Redistributable - x86
Microsoft Visual C++ 2010 Redistributable - x86
Microsoft Visual C++ 2012 Redistributable (x64)
Microsoft Visual C++ 2013 Redistributable (x64)
Microsoft Visual C++ 2015 Redistributable (x64)
Microsoft Visual C++ 2017 Redistributable (x86)
DirectX version: DirectX 12
I solved my problem. First, all my C++ redistributables were installed and up to date. Second, I opened SlimDX.dll with CFF Explorer and a number of the DirectX 9 dependencies were missing. I went to the MS DirectX download page, downloaded and installed DirectX 9 and now everything works. The files that were missing have file names like D3DX9_43.dll and are located in C:\windows\system32. How I lost DirectX 9 in my Windows 10 installation is a mystery, but the version number of DirectX 9 might also be a factor. DirectX 9 is not automatically installed with Windows 10, but I have enough older 3D apps installed that it should have still been available.


Resource contributor
Thanks for the info. I have those files (24 through 43) in my system32 folder. I tried installing DX9.0c and it doesn't install anything, it just says the installed components are ready to use.
It's not slimDX.dll that's missing but other DLLs that it calls. You need to check slimDX.dll with a dependency walker to see what's missing. CFF Explorer can be found here:


Run CFF Explorer on the version of slimDX.dll that you want to use and then run the dependency walker. Missing references will show up with a red tag.


Resource contributor
Thanks Jay, that was helpful to pinpoint the problem, but I don't have a solution.

The problem appears to be that SlimDX.dll is hard coded to look for DLL files in the System32 folder, but on my Win 7 system that folder contains 64 bit DLL files and this DLL file wants 32 bit versions (even the ones in the _x64 SDK folders). The SysWOW64 folder contains the 32 bit DLL files. According to the web this is actually correct, and Windows is supposed to redirect the DLL to look in the SysWOW64 folder for it's DLL files, but that doesn't happen. Once I add the missing DLL files to the System32 folder, the error changes to "SlimDX.dll or one of its dependencies is not a valid Win32 application".

While I changed the missing DLL files to their 32 bit version to see if this would fix this problem, there are many other dependent DLL files there that are 64 bit and thus the error does not go away. Too bad...


Resource contributor
So I found every dependent DLL file in their 32 bit version (either downloaded or from the SysWOW64 folder) and put them into the same folder as the SlimDX.dll file I was using (in the 3DSM2012_x64 folder) and then CFF Explorer said that all DLL files were then 32 bit in the Dependency Walker. Didn't matter - I still get the "not a valid Win32 application". Oh well.
I suppose that you could try copying the Directx libraries from their present location to the folder where SlimDX.dll is located. It should find those first. Every version of SlimDX.dll on my computer is 64 bit, so you need the 64 bit versions of the dependencies.
Last edited:


Resource contributor
Well Jay, thanks so much.

After doing just what you said above it worked! I downloaded all the DLLs that I didn't have in 64 bit versions. Then placed all dependent DLLs into the folder next to SlimDX.dll. The error message that it is not a valid Win32 application tricked me into thinking that I needed 32 bit DLLs. Silly me, this is Microsoft. :)

No error message and a valid MDL file. Yea!

Thanks again,
Last edited: