RE: DirectDrawCreate/SetCooperativeMode problems
- Posted by animeshk at yahoo.com Apr 14, 2003
- 478 views
--- Matt Lewis <matthewwalkerlewis at yahoo.com> wrote: > that I make that are > the hardest to fix. :) First, I'm not sure where > you got the IID for > DirectDraw4_iid, but it's the wrong length fro an > iid, and formatted > strangely. Aaaah that oen . . . I got DirectDraw4_iid by going to ddraw.h in the Dx9 SDK. I saw a DEFINE_GUID for IID_IDirectDraw4, and I figured that was the IID. I cut-and-paste, converting the list of integers into a string, and I formatted the string like other GUID's I was seeing in Euphoria. Unfortunately, I goofed: I left a ", 0x05". Even when I fixed it, however, it didn't work. > In fact, you don't need to declare an > additional interface. > You can use the default interface for the functions > here. It worked! I removed the add_iid call completely and called "SetCooperativeLevel" with no problem. > res = call_interface( DDraw, DirectDraw4_disp, > DirectDraw4_SetCooperativeLevel, > { getHandle(MainWin), 0 } ) > > to: > > res = call_interface( DDraw, 1, > DirectDraw4_SetCooperativeLevel, > { getHandle(MainWin), 8 } ) > > If you don't change the 0 to an 8, you'll get an > error saying that at > least one argument is invalid. Thanks! --Animesh