GPWiki.org
GPWiki.org
It is currently Sat May 25, 2013 10:51 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Dec 01, 2008 12:02 pm 
Rookie

Joined: Mon Dec 01, 2008 11:54 am
Posts: 2
Hi to all!Im new, im from spain, that im sorry for my english.
I have a problem with DX7/D3D hybrid engine. im triying to use it on a Dx7 game that im modding. Well,when i init engine i have a Runtime error:
the err.number is 2005532572. I think it happens for a conflict whit the library dx7vb.dll. Well, I downloaded the hybrid example located in vb lucky web. It works perfectly for me.
When i tryed to discover where the problem was, i saw the problem was here:
Code:
With SurfaceDesc
    .lFlags = DDSD_CAPS
    '.ddsCaps.lCaps = DDSCAPS_PRIMARYSURFACE Or DDSCAPS_3DDEVICE Or DDSCAPS_VIDEOMEMORY' Or DDSCAPS_FLIP Or DDSCAPS_COMPLEX
.ddsCaps.lCaps = DDSCAPS_PRIMARYSURFACE Or DDSCAPS_3DDEVICE Or DDSCAPS_FLIP Or DDSCAPS_COMPLEX Or DDSCAPS_VIDEOMEMORY
End With

Then i have found the line .ddsCaps.lCaps = DDSCAPS_PRIMARYSURFACE Or DDSCAPS_3DDEVICE Or DDSCAPS_FLIP Or DDSCAPS_COMPLEX Or DDSCAPS_VIDEOMEMORY without
Code:
 Or DDSCAPS_FLIP Or DDSCAPS_COMPLEX
works perfectly and error dont happens. But hybrid engine dont works without DDSCAPS_FLIP DDSCAPS_COMPLEX. So i have a problem that cant solve off mi way. Anyone can help me?
Thanks a lot!
Edit: Im tryed to remove reference dx7 from visual basic, close VB6, reopen VB6 and add dx7 reference again. Too im tryed to put dx7vb.dll in program file and use that reference. The problem is always the same. But hybrid engine i downloaded dont give any problem.

Edit2: obiusly Dim SurfaceDesc As DDSURFACEDESC2

Edit3: if i had in .lFlags Or DDSD_BACKBUFFERCOUNT the err.number is 2005532447


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 01, 2008 6:53 pm 
Babirusa
User avatar

Joined: Thu Aug 19, 2004 2:55 pm
Posts: 9241
Location: The Netherlands
Hm, I would carefully check all your code carefully and compare it line by line. Also make sure your form is visible when you initialize DirectX :)

_________________
Serious game developer

http://www.persistentrealities.com
http://www.persistentrealities.com/vbfibre
http://www.ambiances.nl


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 02, 2008 2:07 am 
Rookie

Joined: Mon Dec 01, 2008 11:54 am
Posts: 2
Thanks for your reply!. have seen code line per line, and i secure thtat form Main is visible, but i still having same problem. Te program starts with a sub (Sub Main()). The call InitTileEngine, where we set primary surface and backbuffer. Here is the problem. I post the sub completely code witout modifications, maybe that help you to help me :lol
More info about -2005532572 error:
It is DDERR_INVALIDCAPS: One or more of the capability bits passed to the callback function are incorrect. it gives with DDSCAPS_FLIP and DDSCAPS_COMPLEX in my case.
EDIT!!!ATENTION:
Finaly solved the problem. All problem comes from here:
DirectDraw.SetCooperativeLevel DisplayFormhWnd, DDSCL_NORMAL
is the onlymetod acepted for windowed programs. I have been using these videomode, so it didnt work. I decided view the guide of this web, not from luckys vb web, and step by step y did it! But now mi problem is another.
Thanks a lot!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group