32
Vote

Error Creating a DirectDraw Surface

description

It's throwing this exception when I run it in Vista x64:

file attachments

comments

Encosia wrote Jul 16, 2008 at 1:13 PM

Exception detail attached.

wrote Jul 16, 2008 at 1:13 PM

bsimser wrote Jul 16, 2008 at 1:41 PM

Thanks. There was no testing on Vista or Vista x64 of the program so I expect something like this to crop up.

wrote Jul 16, 2008 at 5:10 PM

wrote Jul 16, 2008 at 7:28 PM

haydenhaddock wrote Jul 16, 2008 at 7:29 PM

I have the same problem on Vista x84

wrote Jul 16, 2008 at 7:46 PM

wrote Jul 16, 2008 at 8:08 PM

wrote Jul 16, 2008 at 9:04 PM

arch4ngel wrote Jul 16, 2008 at 9:06 PM

I suppose that I got the same problem.

I have :
OS: Vista 32bit SP1
DirectX: Direct X 10

I just tried to install the client and play with it. Didn't had time to come up with the sources yet. Damn it... :(

wrote Jul 16, 2008 at 9:06 PM

MarkHoffman wrote Jul 16, 2008 at 9:54 PM

I believe the issue is because Vista doesn't support older versions of DirectX. I tried the following and it is now working for me:

Find an XP machine and grab the following older DirectX DLLs: (Or download them from DLLDump, etc.)

d3drm.dll
dx7vb.dll
dx8vb.dll

And then regsvr the dx7vb and dx8vb.dll.

WaldenL wrote Jul 16, 2008 at 10:24 PM

I second Mark's comments that this is related to the (lack of) support for DirectX 7 in Vista. The root exception occurs on line 83 of ManagedDirectX.cs where it attempts to new up a DirectX7 object. The actuall exception is:

{"Retrieving the COM class factory for component with CLSID {E1211353-8E94-11D1-8808-00C04FC2C602} failed due to the following error: 80040154."}System.Exception {System.Runtime.InteropServices.COMException}

Which we all know means... ClassID not registered.

I would like to see the impact of this kicked up from Low as this will effect all Vista users and i don't think many will copy up DLLs from an old XP machine (not to mention that I don't know if we even can officially do that)

wrote Jul 16, 2008 at 11:22 PM

bsimser wrote Jul 17, 2008 at 1:01 AM

Upgrading the solution to DX9 shortly which should fix any Vista problems (although I'm not sure it'll fix any x64 ones)

wrote Jul 17, 2008 at 1:01 AM

wrote Jul 17, 2008 at 1:01 AM

wrote Jul 17, 2008 at 1:12 AM

wrote Jul 17, 2008 at 1:22 AM

haydenhaddock wrote Jul 17, 2008 at 8:38 AM

Where do I need to put the dlls? In System32?

haydenhaddock wrote Jul 17, 2008 at 8:51 AM

Downloading the dlls - while not a perfect solution - worked for me. By the way, you need to use regsvr32 in vista, while running cmd as an admin.

wrote Jul 17, 2008 at 11:09 AM

wrote Jul 17, 2008 at 5:59 PM

wrote Jul 17, 2008 at 7:17 PM

wrote Jul 17, 2008 at 7:47 PM

wrote Jul 17, 2008 at 9:55 PM

wrote Jul 18, 2008 at 4:13 AM

wrote Jul 19, 2008 at 2:51 PM

wrote Jul 25, 2008 at 1:52 PM

wrote Jul 28, 2008 at 1:44 PM

wrote Jul 30, 2008 at 7:15 AM

kfinke wrote Jul 30, 2008 at 4:24 PM

I have Vista64. I copied the DLLs (the dx7vb.dll and dx8vb.dll were COM, I put them in a folder under my project and ran regsrv32. The other appeared to not be COM, so I copied it to system32.) It got a little farther, but still died. I ended up changing the Platform under Build options to x86 for both the Renderer project and the Terrarium project. Appears to be working!

wrote Aug 3, 2008 at 3:36 PM

wrote Aug 5, 2008 at 9:10 AM

wrote Aug 12, 2008 at 1:18 PM

wrote Aug 13, 2008 at 4:09 PM

wrote Aug 14, 2008 at 7:50 AM

wrote Aug 17, 2008 at 10:31 AM

wrote Aug 20, 2008 at 3:45 PM

wrote Aug 21, 2008 at 12:03 AM

wrote Aug 25, 2008 at 5:06 AM

wrote Sep 5, 2008 at 5:34 AM

wrote Sep 27, 2008 at 6:54 PM

andress wrote Sep 27, 2008 at 6:58 PM

Hey all. A comment on the project's home page like "Vista users click here..." pointing to this work item would be helpful. Would save a few of us some research time (nothing bad with research...hehe). Will try the DX9 upgrade myself, we'll see.

andress wrote Sep 29, 2008 at 10:36 PM

...following up on my attempt to change the Renderer assembly to use DirectX 9, it turned out too involved for a Saturday project, so after 4-5 hours I dropped the effort altogether. I guess I got a bit overconfident :-}

wrote Feb 17, 2009 at 5:00 AM

Tyren wrote Aug 4, 2009 at 8:01 PM

You should consider migrating to XNA.

JBoman wrote Aug 17, 2009 at 3:49 AM

The client crashed straight away in Windows 7 64-bit. Set WIndows XP SP2 compatibility but no joy.

Any workaround for this?

wrote Aug 17, 2009 at 3:50 AM

BrettEden wrote Nov 17, 2009 at 12:40 PM

I have this working without any problems on Windows 7 (Ultimate, 32bit) and Windows Vista (Home) 64bit.

I started off by downloading the source distribution and loading it up in Visual Studio 2008. asmcheck would not build initially but removing the /INCREMENTAL switch in the linker options resolved that. I then built the other dependencies (game, renderer) without any issues. It was then simply a matter of opening up a command prompt with administrative rights and registering the dx7vb.dll and dx8vb.dll files with regsvr32. If this fails with an error 0x80070005, make sure you are logged in on an account that has true administrative rights.

wrote Sep 22, 2010 at 10:32 AM

ScottMacleman wrote Sep 22, 2010 at 1:09 PM

I'm currently running Windows 7 x64 - I can't seem to get it running at all - I've tried the RegSvr32 on the old DirectX files but that made not difference.

I'm currently working on a VS2010 thats about to expire so I'm not going to commit to doing anything until I sort that out - otherwise I'm happy to help / test etc.

Has anyone actually transfered it to DX9~10 or XNA yet?

Smurph wrote Jan 23, 2013 at 1:21 AM

I ran into a problem where the dlls I downloaded from dll-files.com did not work, even after running regsvr32. I tried again with dlls from dlldump.com and now I can launch without getting the exception. Something to watch out for.

ScottMacleman wrote Jan 23, 2013 at 7:33 AM

The code has been ported to xna, but the code has not been committed yet.

cyberneticxp wrote Jan 29, 2013 at 12:57 PM

Is this XNA port already available? In binary form preferably in source!

ScottMacleman wrote Jan 29, 2013 at 3:30 PM

Yeah i finished adding xna and ripping out the dx about 6 months ago, im waiting to hear back as to how i get it into the repos still.

cyberneticxp wrote Jan 29, 2013 at 3:50 PM

Scott,

Is it because you do not have repository write access? If you are waiting for a half year than maybe you can share your improvements elsewhere?

Regards,
Steve

ScottMacleman wrote Jan 29, 2013 at 4:50 PM

Yeah, I think only the Microsoft Devs have write access. I think its probably best to keep the code all in one place because since I sorted the XNA, you are the only person that has expressed an interest. I don't think we should spread ourselves any thinner!

cyberneticxp wrote Jan 30, 2013 at 3:57 PM

Scott,

I totally agree!

Regards,
Steve

bluehawk80 wrote Feb 5, 2013 at 10:14 AM

There are definitly more people with interest in a working version of this.

But most people test the project and it doesnt work and they loose interest. I agree, that no new repo should be created. But maybe it would be nice to share working binaries.

Sadly Microsoft buried XNA :(

ScottMacleman wrote Feb 5, 2013 at 3:58 PM

Here is the binary for the XNA version - http://sdrv.ms/Ws6TcW It proves the XNA concept and will allow people to get a few organisms running.

ScottMacleman wrote Feb 7, 2013 at 6:56 PM

is the download I provided working ok?

Anyone know if its possible to get Repos access so I can just commit my changes?

cyberneticxp wrote Feb 8, 2013 at 12:00 PM

The download is perfect, will try it later

wrote Feb 14, 2013 at 7:11 PM