What files do I EXACTLY need to include with my Game to make managed DirectX work?
Hi,
I'm using Visual Studio 2005 Beta 2 and August 2005 DX SDK. In my project, I reference the following file from the SDK:
Microsoft.DirectX.dll
Microsoft.DirectX.Direct3D.dll
Microsoft.DirectX.Direct3DX.dll
(I set the option "copy to local folder")
these files are included in my zip-file which I want to get work on computers where the DirectX SDK is not installed. Please don't tell me to install the Redistributable on the target machine. It is a pain for other users going to this site, passing windows validation, downloading 20 MB DirectX files for a 2 MB game and installing them. I hope, it is possible to get managed DirectX working without doing this.
When I start my game on the other computer the program runs exactly until its first use of the DirectX API, then reporting a
System.IO.FileNotFoundException: Das angegebene Modul wurde nicht gefunden. (Exception from HRESULT: 0x8007007E)
There is absolutely NO clue, what file was not found (however I am extremely sure it is dx-related). Also the FileName-Property of this Exception is null. I have no idea which files I am missing and I hope you can tell me how to find out.

thanks in advance,
SecurityException
To be more precisely, some calls to the DirectX API _do_ work. For example
| | AdapterDetails details = Manager.Adapters.Default.Information; Program.writeLog(details.Description); Program.writeLog(details.DriverName + "(" + details.DriverVersion + ")"); ... Device.IsUsingEventHandlers = true; |
using the class PresentParameters is also possible. I think, using structs like Vector3 or Matrix should also work.
The Exception is thrown at
| | Manager.CheckDepthStencilMatch( 0, DeviceType.Hardware, pixelFormat, pixelFormat, format ); |
so I guess the managed DLLs have problems calling the native functions. But this is just a guess...
SecurityException wrote: |
I'm using Visual Studio 2005 Beta 2 and August 2005 DX SDK. In my project, I reference the following file from the SDK: Microsoft.DirectX.dll Microsoft.DirectX.Direct3D.dll Microsoft.DirectX.Direct3DX.dll ... these files are included in my zip-file which I want to get work on computers where the DirectX SDK is not installed. Please don't tell me to install the Redistributable on the target machine. It is a pain for other users going to this site, passing windows validation, downloading 20 MB DirectX files for a 2 MB game and installing them. |
|
Unfortunately you have no other option other than providing the DirectX Redistributable component to your users. The terms of the DirectX SDK's EULA don't let you include the DLLs you've mentioned above in the the ZIP file you distribute to your users.
Fortunately, doing things the right way isn't as a big a pain as you might think. First, since you are providing the redistributable, they don't have to go through Windows Genuine Advantage validation, you just include the redistributable in your ZIP file. Second, you don't have to include all the files in the redistributable, so it doesn't need to be that big. If you're willing to assume your users already have DirectX 9.0c already installed, you should only need to include the following files:
dxsetup.exe dsetup32.dll dsetup.dll dxupdate.cab Aug2005_MDX_x86.cab Aug2005_dx3x9_27_x86.cab Aug2005_dx3x9_27_x64.cab If you have a setup program for your game then it should use the DirectX Setup API to install the necessary managed components. If you don't, then you'll need to tell your users to run dxsetup before playing your game for the first time.
You can read more about this by viewing the Installing DirectX with DirectSetup topic in the DirectX C++ documention.