Jump to content
  • Advertisement
Sign in to follow this  
Hedos

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

This topic is 5042 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!