473,473 Members | 2,219 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

C# DirectPlay lobby launch not working?

I am trying to launch Flight Simulator 2004, and have it connect to
localhost, I can do this in C++ but not on C#...

Here is my code:

ConnectInformation info = new ConnectInformation();
ConnectionSettings settings = new ConnectionSettings();
settings.HostAddress = new Microsoft.DirectX.DirectPlay.Address("127.0.0.1",
23456);;
Guid g = new Guid("0808caa5-e62c-4691-8957-5d4524b922da");
info.Flags = ConnectFlags.LaunchNew;
info.GuidApplication = g;
info.ConnectionSettings = settings;
info.UseConnectionSettings = false;
connectioninfo = theClient.ConnectApplication(info, 60000, null);
theClient.SetConnectionSettings(connectioninfo, settings);

if I change info.UseConnectionSettings to true, the program crashes, if it's
false, the program is launched but does not connect to the multiplayer.

Any help will be approciated,
Moshe Bergman
Nov 15 '05 #1
1 2686
Moshe,

I'm also trying to interface to MSFS2004 using DirectX/Managed/C#. I've had
some luck by modifying the "Migrated Hosts" sample program under the
"Tutorials" directory.

The furthest I was able to get was to see the FS "Host" session returned
using "Peer.FindHost()", and have it "Reject" my attempt to connect with
"Peer.Connect()". Since I didn't format the data in the "Connect" packet,
I'm not surprised at the rejection.

Have you made any more progress on this?

"Moshe Bergman" <po**@newsgroup.com> wrote in message
news:ej*************@TK2MSFTNGP11.phx.gbl...
I am trying to launch Flight Simulator 2004, and have it connect to
localhost, I can do this in C++ but not on C#...

Here is my code:

ConnectInformation info = new ConnectInformation();
ConnectionSettings settings = new ConnectionSettings();
settings.HostAddress = new Microsoft.DirectX.DirectPlay.Address("127.0.0.1", 23456);;
Guid g = new Guid("0808caa5-e62c-4691-8957-5d4524b922da");
info.Flags = ConnectFlags.LaunchNew;
info.GuidApplication = g;
info.ConnectionSettings = settings;
info.UseConnectionSettings = false;
connectioninfo = theClient.ConnectApplication(info, 60000, null);
theClient.SetConnectionSettings(connectioninfo, settings);

if I change info.UseConnectionSettings to true, the program crashes, if it's false, the program is launched but does not connect to the multiplayer.

Any help will be approciated,
Moshe Bergman

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Lt | last post by:
Hello, I'm gonna write my first 3D multiplayer game using DirectPlay, VC++ ..NET 2002. I've done tutorials supplied along with DXSDK Then I wanted to use the DirectX AppWizard but it produced over...
4
by: JariTapio | last post by:
Hei! I explored DirectX 8.1 SDK and found TUT09_ClientServer it includes the following code as a part of the tutorial... //---- HRESULT WINAPI DirectPlayMessageHandler(PVOID pvUserContext,...
3
by: Mohammad-Reza | last post by:
Hi Please tell me how can I send a file with DirectPlay to a server.(Client/Server program). Thanks in advance
3
by: Téo | last post by:
Hi, Do you know where i could find some interesting documentation about DirectPlay for managed dev. I have been searching for a long time on the web without any success. Thanks.
7
by: Christopher C | last post by:
I am using a C# winform to launch some apps for our students. Basically the user hits a button the form hides and the app is launched. When the app exits, the form is unhidden. I have a question on...
0
by: saragwyn | last post by:
Hello - I have successfully been using the following line of code to launch the default browser from within my application. I recently got a report from one of my users that it wasn't working...
4
by: Chris Smith | last post by:
Experienced posters, Seems that the directx.networking newsgroup isn't very active, so forgive me for asking my question in this group. But anyone have any good example code or a good website...
4
by: Joe | last post by:
I created a CustomAction for this but I don't think I have it in the right place. I tried both Install and Commit but neither allow it to get to the final screen. Are there any examples of this...
18
by: Prosdo | last post by:
Hey Everyone. I have a program for school that is suppose to project how many seconds it takes a projectile to hit the ground. I have the formula, but the loop is not posting to my output file. Can...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.