[.net] Managed C++ - DirectPlay information..

Started by
13 comments, last by Washu 19 years, 4 months ago
Hey, I recently started a project with Managed C++ and DirectPlay.. I already used DirectPlay a little bit in unmanaged C++, so I thought it would be quite easy to do the same thing in managed C++.. I was wrong, I have quite a few problems. The main problem I would say is the -lack of documentation-. There's nothing good on MSDN. I haven't found any tutorial on google either. Could any of you tell me if you know a place where there would be some information on the subject? Thanks a lot. I'm using Visual Studio .NET with DirectX 9.0
Advertisement
If i recall correctly, DirectPlay was never ported to the managed DX framework. More specifically, it is considered obsolete by microsoft due to lack of developer support. Use System.Net instead.

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.

Well, DirectPlay is supported in .NET even though it is considered obsolete And unfortunatly, I am in the obligation to use DirectPlay.

Right now, I have a small text file describing basically how to set up a chat server, unfortunatly, even after revising every thing, the connection is never working between the host and the server program.

Any idea what are the most common errors causing this?
Or again, if anyone still any website for me, I'd be glad to see it.
Hrm, any exceptions thrown? Can you give some code?

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.

Yeah, sure.

Here's right where it doesn't work:

It is in the client code, when attempting to connect to the server.
try{  this->m_Client->Connect(appDesc, m_HostAddress, this->m_LocalAddress, NULL, ConnectFlags::Sync);  m_SessionName = SelectedHost->GetSessionName();  m_Connection = ConnectionType::Connected;}catch(Exception*){  MessageBox::Show("Could not connect to the session ", "Connection failure", MessageBoxButtons::OK, MessageBoxIcon::Exclamation);  return;}


The exception does not say anything important but "Error in the application."
It occurs about 15 seconds after the connection was attempted.

Some information I obtained from my firewall:
-The server tries to access internet when started
-The client tries to access internet when attempting connection to the host
-The server wants to accept a connection from the local network when the client attempts a connection to the server

Thanks for trying to help me, I can dump some more code, tell me what you are interested in.
Tell me, does some process, like svr32 or something start up when that code runs?

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.

"dpnsvr.exe" (Microsoft DirectPlay8 Server) does!

What's the consequence of that?
Well, tell me, does it exit shortly (like very fast) after it starts?

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.

It starts as soon as I start my server.. and it seems to stay open forever even after my program is closed :/

It does not seem to be related at all with the client though.
Well, here's what I've noticed (in my own personal adventures with DPlay). DPNSVR starts up, tries to make some connections (viewed via TCPView) and when those "fail" it quits. Now, i've noticed that if i disconnect the router from the internet, and launch my dplay app while the router is disconnected, dpnsvr will launch and remain running, and my connections will work fine.

Some info on DPNSVR

Other than that, i'm not entirely certain.

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.

This topic is closed to new replies.

Advertisement