Hi,i am writing an remoteapp activex in C# using the rdp library.I can start a program at the start connect,and lauch Multiple
programs,but if i close all the programs.after a few minutes,may be one or tow ,the connect is disconnected.there is a function
named reconnect in the interface imsrdpclient8,but the reference i added has only interface imsrdpclient 1 to 6,and not 7,8.so i
had to call the connect function again,but the program only runs in the server (no show in the client)
here is part of code:
if (rail.Connected == 0)
{
setServer(ip, useranme, password, domain);
rail.OnConnected += new EventHandler(sendExe);
rail.OnDisconnected += new AxMSTSCLib.IMsTscAxEvents_OnDisconnectedEventHandler(ee);
// ((IMsRdpClientAdvancedSettings)rdp.AdvancedSettings).shutdownTimeout = 60;
i5 = (IMsRdpClient6)secured;
i5.RemoteProgram.RemoteProgramMode = true;
isCon = true;
rail.Connect();
} esle if (rail.Connected == 1){
i5.RemoteProgram.ServerStartProgram(this.program, null, null, false, null, false);
}
public void sendExe(object sender, EventArgs e)
{
i5.RemoteProgram.ServerStartProgram(this.program, null, null, false, null, false);
}
can anyone help me?
thanks any reply.
programs,but if i close all the programs.after a few minutes,may be one or tow ,the connect is disconnected.there is a function
named reconnect in the interface imsrdpclient8,but the reference i added has only interface imsrdpclient 1 to 6,and not 7,8.so i
had to call the connect function again,but the program only runs in the server (no show in the client)
here is part of code:
if (rail.Connected == 0)
{
setServer(ip, useranme, password, domain);
rail.OnConnected += new EventHandler(sendExe);
rail.OnDisconnected += new AxMSTSCLib.IMsTscAxEvents_OnDisconnectedEventHandler(ee);
// ((IMsRdpClientAdvancedSettings)rdp.AdvancedSettings).shutdownTimeout = 60;
i5 = (IMsRdpClient6)secured;
i5.RemoteProgram.RemoteProgramMode = true;
isCon = true;
rail.Connect();
} esle if (rail.Connected == 1){
i5.RemoteProgram.ServerStartProgram(this.program, null, null, false, null, false);
}
public void sendExe(object sender, EventArgs e)
{
i5.RemoteProgram.ServerStartProgram(this.program, null, null, false, null, false);
}
can anyone help me?
thanks any reply.