Leaked source code of windows server 2003
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> <TITLE></TITLE> </HEAD>
<BODY>
<TABLE> <TBODY> <TR> <TD><BUTTON id=CreateNewSession name=CreateNewSession onclick=CreateNewSession()>Create new RDS Session</BUTTON></TD> <TD><BUTTON id=CloseSession name=CloseSession onclick=CloseSession()>Close open RDS Session</BUTTON></TD> </TR> </TBODY> </TABLE>
<HR>
<TABLE> <TBODY> <TR> <TD><BUTTON id=OpenExistingSession name=OpenExistingSession onclick=OpenExistingSession()>Open Existing RDS Session</BUTTON></TD> <TD><INPUT id=existingParms name=existingParms style="HEIGHT: 22px; WIDTH: 521px"></INPUT></TD> </TR> </TBODY> </TABLE>
<HR>
<TABLE> <TBODY> <TR> <TD><BUTTON id=updateConnectParms name=updateConnectParms onclick=UpdateConnectParms()>Update Connect Parms</BUTTON></TD> <TD><INPUT id=connectParms name=connectParms style="HEIGHT: 22px; WIDTH: 521px"></INPUT></TD> </TR> </TBODY> </TABLE>
<HR>
<TABLE> <TR> <TD><INPUT id=incomingChatText name=incomingChatText height="150" style="HEIGHT: 150px; WIDTH: 275px" width="275" ></INPUT></TD> </TR> <TR> <TD><INPUT id=chatText name=chatText style="WIDTH: 275px" width="275" ></INPUT></TD> <TD><BUTTON id=sendChatButton name=sendChatButton onclick=SendChatButtonHandler()>Send</BUTTON></TD> </TR> </TABLE> <OBJECT ID="pchealth" classid="CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7"></OBJECT> <SCRIPT Language="JScript"> var RDSHost = null; var RemoteDesktopSession = null; var ChannelManager = null; var ChatChannel = null; var sPass = ""; var iDuration = 36000; var DESKTOPSHARING_DEFAULT = 0x0000; var NO_DESKTOP_SHARING = 0x0001; var VIEWDESKTOP_PERMISSION_REQUIRE = 0x0002; var VIEWDESKTOP_PERMISSION_NOT_REQUIRE = 0x0004; var CONTROLDESKTOP_PERMISSION_REQUIRE = 0x0008; var CONTROLDESKTOP_PERMISSION_NOT_REQUIRE = 0x00010; function UpdateConnectParms() { if (RemoteDesktopSession != null) { var str; str = RemoteDesktopSession.ConnectParms; connectParms.value = str; } } function CreateNewSession() {
if (RemoteDesktopSession != null) { alert("Must close existing session first."); return; }
//RDSHost = new ActiveXObject("RDSHost.SAFRemoteDesktopServerHost.1"); RemoteDesktopSession = pchealth.CreateObject_RemoteDesktopSession( CONTROLDESKTOP_PERMISSION_NOT_REQUIRE, iDuration, "", sPass); var x;
ChannelManager = RemoteDesktopSession.ChannelManager; ChatChannel = ChannelManager.OpenDataChannel("70"); ChatChannel.OnChannelDataReady = function() { OnChannelDataReadyEvent(); } // Bind events. RemoteDesktopSession.OnConnected = function() { OnClientConnected(); } RemoteDesktopSession.OnDisconnected = function() { OnClientDisconnected(); } }
function OpenExistingSession() {
if (RemoteDesktopSession != null) { alert("Must close existing session first."); return; }
RemoteDesktopSession = pchealth.CreateObject_RemoteDesktopSession( VIEWDESKTOP_PERMISSION_NOT_REQUIRE, iDuration, existingParms.value, sPass); var x;
ChannelManager = RemoteDesktopSession.ChannelManager; ChatChannel = ChannelManager.OpenDataChannel("70"); ChatChannel.OnChannelDataReady = function() { OnChannelDataReadyEvent(); } // Bind events. RemoteDesktopSession.OnConnected = function() { OnClientConnected(); } RemoteDesktopSession.OnDisconnected = function() { OnClientDisconnected(); } } function CloseSession() { if (RemoteDesktopSession != null) { RemoteDesktopSession.CloseRemoteDesktopSession(); RemoteDesktopSession = null; } } function SendChatButtonHandler() { if (ChatChannel != null) { ChatChannel.SendChannelData(chatText.value); } } function OnChannelDataReadyEvent(channelName) { var str; str = ChatChannel.ReceiveChannelData() incomingChatText.value = incomingChatText.value + "\n" + str; } function OnClientConnected() { alert("Client connected."); } function OnClientDisconnected() { alert("Client disconnected."); } </SCRIPT>
</BODY> </HTML>
|