🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Directx troubles

Started by
3 comments, last by ggs 24 years, 5 months ago
Hi. i''m using Delphi5 and a translated version of DirectX6. I can successfully create a direct draw object, set the coop level and change the display mode. How ever when I when a add the code to dispose of the ddraw object, my program generates 3 errors when it finishes. Here is the code i''m using the release to object. var ddraw_ptr : IDirectDraw; ... // release the directdraw object if (ddraw_ptr <> nil) then ddraw_ptr._Release; // this line generates the errors Am I doing this right? If not how can i fix it? I''m not too sure if this is the right method. Thanks for any help
Advertisement
Hi ggs.
I allready use the DX7 Headers, but I get the same error:

DirectXResult := DDrawObjekt._Release;
if DirectXResult <> DD_OK then //here is the error , but its unknown

//I do the following to kind of "release" it
pointer(DDrawObjekt) := nil;
DDrawObjekt := nil;

I don''t know how to fix this, does anyone ?
Maybe an error in the translated headers.

-crent-
See my other topic. It has more info.
DDrawObjekt._Release returns a value defined BY delphi''s iunknown class. Thus the function ErrorString (its provided by the translated header) doesnt know what it is.
STUPID slow internet connection.
See my other topic. It has more info.
DDrawObjekt._Release returns a value defined BY delphi''s iunknown class. Thus the function ErrorString (its provided by the translated header) doesnt know what it is.
If you call ._Release on all the Surfaces you created with the DirectDrawOject then the call to DirectDrawOject._Release will work without an error.

Just tested that. But I thought Surfaces will be automatical released when the main DirectDrawOject is released.

-crent-

This topic is closed to new replies.

Advertisement