LPDIRECTDRAW7 DirectDraw7Ptr;
if ( FAILED ( DirectDrawCreateEx( NULL, (void**) &DirectDraw7Ptr, IID_IDirectDraw7, NULL ) ) ) {
return false;
} else { return true; }
(Note the & is missing)
LPDIRECTDRAW7 DirectDraw7Ptr;
if ( FAILED ( DirectDrawCreateEx( NULL, (void**) &DirectDraw7Ptr, IID_IDirectDraw7, NULL ) ) ) {
return false;
} else { return true; }
(Note the & is missing)
Was this done just to avoid having to use a regular DirectDrawCreate, then querying for a new version of the interface?
How is this better than just biting the bullet and using CoCreateInstance with Initialize? After all, you'll need to to use the COM methods if you want to use DirectMusic anyways, so why not just use them to begin with instead of mixing the two?
LPDIRECTDRAW7 DirectDraw7Ptr;
if ( FAILED ( DirectDrawCreateEx( NULL, (void**) &DirectDraw7Ptr, &IID_IDirectDraw7, NULL ) ) ) {
return false;
} else { return true; }
I have included ddraw.h, initguid.h, and the ddraw.lib files. I get this error everytime i compile:
D:\MyProjects\DDraw\DDraw.cpp(111) : error C2664: 'DirectDrawCreateEx' : cannot convert parameter 3 from 'const struct _GUID *' to 'const struct _GUID &'
Could someone please help me? Is there something I've missed?