This topic is now archived and is closed to further replies.

Guest Anonymous Poster

DirectPlay Serial Service Dialog!

Recommended Posts

Guest Anonymous Poster
Can anyone help with my little problem.

I am using the Serial Service provier with DirectPlay. I am creating a
CompoundAddress consisting of the Serial Service provider and a
DPCOMPORTADDRESS structure to initialize the connection. This works fine and
no dialog appears as expected. But when I Enum the Sessions, even with the
DPENUMSESSIONS_RETURNSTATUS flag I get a dialog box appearing asking for the
serial port settings.

How do I stop this. Many thanks

Here is the streamlined code for the above problem. Everything works it just
opens a dialog when I Enum the sessions, which according the the DirectX
help file it shouldnt if I have provided all the data needed for the
connection, and I use the DPENUMSESSIONS_RETURNSTATUS flag in EnumSessions.

Any ideas, or is it not possible to avoid this Dialog?

DWORD AddressSize;
void *Address;

BOOL CreateSerialAddress_sys(void)
long count;

count = 0;

AddressElements[count].guidDataType = DPAID_ServiceProvider;
AddressElements[count].dwDataSize = sizeof(GUID);
AddressElements[count++].lpData = (VOID*)&DPSPGUID_SERIAL;

AddressElements[count].guidDataType = DPAID_ComPort;
AddressElements[count].dwDataSize = sizeof(DPCOMPORTADDRESS);

AddressElements[count++].lpData = &ComPort;

if ( IDirectPlayLobby_CreateCompoundAddress(DirectLobby, AddressElements,
count, NULL, &AddressSize) == DPERR_BUFFERTOOSMALL )
Address = Memory_Calloc_sys(GHND, AddressSize);

if ( Address )
if ( IDirectPlayLobby_CreateCompoundAddress(DirectLobby, AddressElements,
count, Address, &AddressSize) == DP_OK )
ZeroMemory(&sessionDesc, sizeof(DPSESSIONDESC2));
sessionDesc.dwSize = sizeof(DPSESSIONDESC2);
sessionDesc.guidApplication = AppGUID;
sessionDesc.guidInstance = GUID_NULL;

IDirectPlayX_EnumSessions(DirectPlay, &sessionDesc, 0,

Share this post

Link to post
Share on other sites