Simple Initialize a device....

Started by
6 comments, last by FenixRoA 18 years, 4 months ago
So I try the following line of code in C# (Microsoft Visual Studio 2005): Microsoft.DirectX.DirectDraw.Device mydev = new Microsoft.DirectX.DirectDraw.Device(); Please note that I have no other code in this particular program aside from this one line of device initialization. Here is the Exception I'm getting: System.IO.FileNotFoundException was unhandled Message="The specified module could not be found. (Exception from HRESULT: 0x8007007E)" Source="Microsoft.DirectX.DirectDraw" StackTrace: at Microsoft.DirectX.DirectDraw.Device.CreateDDObject(Guid& lpGuid, CreateFlags flags) at Microsoft.DirectX.DirectDraw.Device..ctor() at MotoRotor.Program.Main(String[] args) in C:\Documents and Settings\Rouah Lafheed\My Documents\Visual Studio 2005\Projects\MotoRotor\MotoRotor\Program.cs:line 11 at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() Note that I have the October 2005 update for the DX SDK. Please also note that I have the following related assemblies referenced in this project: Microsoft.DirectX - Runtime Version: 2.0, Version: 2.0.900.0 Microsoft.DirectX.DirectDraw - Runtime Version: 1.1.4322 Version: 1.0.2902.0 Any and all suggestions and help would be appreciated, Fenix RoA PS and yes I know that even a retarded puppy couldnt screw up initializing a device with DX, so please just take it easy on me
Advertisement
I'm not an MDX programmer, but I am aware of various "issues" with VS2005 and the October update. The last DX SDK predates the RTM of VS2005 (and final .Net 2.0 framework) so they seem to be slightly out of sync. We're due another SDK sometime soon though.

Quote:Microsoft.DirectX - Runtime Version: 2.0, Version: 2.0.900.0
Microsoft.DirectX.DirectDraw - Runtime Version: 1.1.4322 Version: 1.0.2902.0
(emphasis mine)

The first entry seems fine, but by the looks of it the DDraw versions won't match up - 1.1 is the pre-whidbey version as I understand it.

I'd double check that you have the latest .Net 2.0 parts (check the beta program) or downgrade back to 1.1 until the December SDK.

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Quote:Microsoft.DirectX - Runtime Version: 2.0, Version: 2.0.900.0


This will only worked with VS2005 Beta 2 (stupid eh).

Remove that reference and add the Microsoft.DirectX reference with the same version number as the Microsoft.DirectX.DirectDraw reference you added (i.e.
Runtime Version: 1.1.4322 Version: 1.0.2902.0).

You will have to wait til they release the next version of DirectX (which i thought was suppose to be out this month) until VS2005 full version has support for the whidbey (2.0) .NET framework .

Hope this helps,

Alex.
Quote:Original post by jollyjeffers
I'd double check that you have the latest .Net 2.0 parts (check the beta program) or downgrade back to 1.1 until the December SDK.


I'm not entirely sure I understand...
assuming i do have all the lastest .net 2.0 "parts," should I uninstall .net framework 2.0 until the release of the december sdk?

Chthonic

I tried with referencing both to the same version, however, the same error came up
The .NET 2.0 DirectX assemblies are currently not working properly. I would suggest sticking with the .NET 1.1 assemblies until the December SDK release.

I hope this helps.
Take care.
Ok... again..
I've tried to switch my referenced DirectX assemblies to be the same version (1.1) and it still gives me the same error... any other ideas for a temporary fix until the new SDK is out?
EUREKA...

KK

I figured it out... you were all right. I had to switch back to v1.1 of the DirectX SDKs, however, earlier VS2005 foresaw a problem in which I'd need to redirect (in some fashion) older versions to the newer 2.0 version. It asked me if I wanted to create an app.config file, and at the time I thought nothing of it.. Now I deleted the app.config file after switching to 1.0 and now i'm getting a different error in my program from another line.

Thanks for your time and consideration,
FenixRoA

This topic is closed to new replies.

Advertisement