🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

DirectPlay Serial Service Dialog!

Started by
-1 comments, last by GameDev.net 24 years, 6 months ago
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
Chris


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?

DPCOMPORTADDRESS ComPort;
DPCOMPOUNDADDRESSELEMENT AddressElements[3];
DWORD AddressSize;
void *Address;

BOOL CreateSerialAddress_sys(void)
{
long count;
DPSESSIONDESC2 sessionDesc;

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,
&EnumSessionCallBack, NULL, DPENUMSESSIONS_ALL |
DPENUMSESSIONS_RETURNSTATUS);
}
}
}
}


This topic is closed to new replies.

Advertisement