Game Development Reference
In-Depth Information
}
else
{
MessageBox.Show(“Error launching console application”);
}
}
The function LaunchConsoleWrapper takes in the argument string to pass to the con-
sole entry point, and launches the console entry point with redirected standard
output.
Alert Object Remoting
A great feature of the .NET platform is the ability to invoke remote procedure calls
(RPC) from proxy objects published by a server machine. remoting solves a num-
ber of deployment concerns and allows for a variety of distributed architectures.
Clients can have a local copy of the tool interface, except the implementation itself
exists on a remote machine. A client would connect to the remote machine,
request a proxy object of a certain type, and use the proxy object as if it were a local
system variable.
In order to support Remoting, the first thing to do (aside from building an object
that inherits from MarshalByRefObject ) is to open a remoting channel and publish
an object on it that clients will use.
Here is the code to open a remoting channel on a specific port number and pub-
lish an object on it:
// The Tcp channel to publish the proxy on
private TcpChannel _channel = null;
// A reference to the remoted proxy object
private AlertObjectTool.AlertObjectToolLogic _remotedLogic = null;
// A reference to the proxy information
private ObjRef _remotedLogicRef = null;
private void ActionButton_Click(object sender, System.EventArgs e)
{
if (ActionButton.Text.Equals(“Start Listening”))
{
ActionButton.Text = “Stop Listening”;
Search Nedrilad ::




Custom Search