DPlay setup without dialog boxes!!!!

Started by
6 comments, last by ByteMe95 23 years, 7 months ago
I really really want to know how I can get my DPlay setup not to use windows dialog boxes. I got it setup so I can enumerate connection settings ok, and I can let the user type in an ip, but I dont know how to get this info to DPlay. Froim all the exmaples I''ve seen, when you select a connection widnows will prompt you with the necessary window to finish the job. Like TCP/IP->enter IP (windows) Modem->Enter phone number etc. so how do i get the necssary info myself and give it to dplay myself. I realize its the IDirectPlay3::InitializeConnection() method that calls those window popups to show up, so how do I bypass that with my own aquire input? Hope ive made this clear enough thanx ByteMe95::~ByteMe95() Cerebrum Software
ByteMe95::~ByteMe95()My S(h)ite
Advertisement
I don''t think dplay supports that sort of connecting.
Try using IPX, TCP, UDP from winsock.
___________________________Freeware development:ruinedsoft.com
Actually you can do what you want. In fact I have done exactly that not so long ago, so if you have any question don''t hesitate to ask me. What you have to do is to override the service provider.
When you call EnumerateConnections, DP gives some service providers addresses that later you''ll use to initialize the connection. Well, what you have to do is to create your own DP address with all the information it needs, so it will not ask you about the inf with a disturbing MessageBox. That''s why you don''t get MBox with IPX, it doesn''t need any special information.
To create a DP address you must use IDirectPlayLobby3::CreateCompoundAddress giving all the information for that service provider (IP address, COM port, telephone number... whatever). Store the DirectPlay address it creates, and use it for initializing the connection.
There''s a very good example in the DirectX SDK, called "Override". Anyway if you have any doubt (Modem can be specially problematic) don''t hesitate to ask me.

Hope it helps.

Eduardo Garcia Sacristan
egarcia@ubisoft.es
Eduardo García SacristánProgrammer. UbiSoft Spainegarcia@ubisoft.es
Hey, thanks alot eduardo, I''ll look into that

And I assume I can use the lobby approach evcen if I dont want to use, right?

Thanks again

ByteMe95::~ByteMe95()
Cerebrum Software
ByteMe95::~ByteMe95()My S(h)ite
Hey Eduardo, if I use CreateCompundAddress, do I ahve to register my app and make it lobbyable? Or could it be completely non-lobbyable but I could still use that function to create an connection information?

I dont think I need to make it lobbyable, but im not sure

Thanks again
- Rob



ByteMe95::~ByteMe95()
Cerebrum Software
ByteMe95::~ByteMe95()My S(h)ite
hey, isnt there a non-dialoged box example in the sdk...

i dont know for sure. oh well.
No, you don''t need to make your application really lobbyable. I don''t know why, but DX programmers put the CreateCompoundAddress under the IDirectPlayLobby3 object. One of the utilities of CreateCompoundAddress is that the information for the specific service provider can be supplied from a lobby program, but it doesn''t mean that it will come from a lobby. Therefore you just need to create the DPLobby object for creating the address. Something like this:

// Create AUX DPLobby for overriding the address
CoCreateInstance( CLSID_DirectPlayLobby, NULL, CLSCTX_INPROC_SERVER, IID_IDirectPlayLobby3A, (VOID**)&g_pDPLobby );

//Fill the DP Address

//Create the DP Address
(...) CreateCompoundAddress (...)

//Create the DP object you will finally use

//Initialize the connection
InitializeConnection( &OverridedAddress )

// Destroy the temporal DPLobby object
g_pDPLobby->Release();

Hope it helps!
Eduardo García SacristánProgrammer. UbiSoft Spainegarcia@ubisoft.es
Thanks a lot eduardo, I got the TCP/IP working now.
Just need to find some time to do modem and serial connections

Thanks again

btw, what info do i need form the user for serial connections and for the modem?

I think serial i just need the COM port and the modem I need the modem which I think I could enumerate using one of the DP functions and if you''re the one dialing, the phone number.

- Rob

ByteMe95::~ByteMe95()
Cerebrum Software
ByteMe95::~ByteMe95()My S(h)ite

This topic is closed to new replies.

Advertisement