Advertisement

Directx troubles

Started by January 15, 2000 02:31 AM
3 comments, last by ggs 25 years, 1 month 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
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-
Advertisement
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