I just figure out how to get the ddraw.inc included with MASM32 to work. Did a call to set cooperative level and got DD_OK:alright:

I have DD8.1 so I guess I'm using the DD7 interface?

Here is some code:

invoke LoadLibrary, addr DdrawDll
mov hDDlib, eax

invoke GetProcAddress, hDDlib, addr DDC

invoke DirectDrawCreate, 0,ADDR lpDD ,0
create window
mov ecx,[lpDD]
mov ecx,[ecx]

push 8
push 0
push hwnd
call dword ptr[ecx][4] ; SetCooperativeLevel

The first parameter of DirectDrawCreate can be GUID or NULL. If it is NULL, the active displaydriver is used. Does that mean I'm using DD7. If not, where can, and how do I use the GUID of DD7 as a parameter with DirectDrawCreate?

Posted on 2002-06-13 06:59:15 by ThoughtCriminal
From the above code you are using IDirectDraw1

you will have to call QuerryInterface with the GUID of the desired DD interface or use CoCreateInstance with the required GUID
Posted on 2002-06-14 09:27:45 by BogdanOntanu
Thanks, I'll see what I can find out then.....
Posted on 2002-06-15 04:51:50 by ThoughtCriminal