Skip to main content
gamedev.net
🔒 Locked

COM

Started by BlueGrass Oct 15, 2000 at 3:15 PM 1 replies 200+ views
Original Post
BlueGrass
BlueGrass
okay every time i run CoCreateInstance to setup DirectPlay, it freezes my program and the compiler its running under. Anyone know why? if ( FAILED( CoInitialize( NULL ) ) ) { return error( 2 ); } if ( FAILED( CoCreateInstance( CLSID_DirectPlay, NULL, CLSCTX_ALL, IID_IDirectPlay3A, ( void * * )&dplay.pdp ) ) ) { CoUninitialize(); return error( 1 ); } CoUninitialize(); BlueGrass
Steel
Steel
Check out the fifth parameter you typed:

if ( FAILED( CoCreateInstance( CLSID_DirectPlay, NULL, CLSCTX_ALL, IID_IDirectPlay3A, ( void * * )&dplay.pdp ) ) )

Did you mean to type &dplay.pdp? Why the insertion point? "pdp" is not a member variable or function of the IDirectPlay3A interface. Also, if you are using DirectX 7, IDirectPlay4A is the newest interface if you are interested.

Edited by - Steel on October 15, 2000 8:19:39 PM
BlueGrass
BlueGrass
dplay is my own structure. Also i don''t know much about DirectPlay4 yet so i''m just using DirectPlay3 right now. thanks anyways!

struct
{
LPDIRECTPLAY3A pdp;
LPDIRECTPLAYLOBBY2A pdpl;
} dplay;

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.