SessionLoader
requestScreenEx Method
Example 



Reserved parameter. Pass in an empty string "" as parameter value.
Reserved parameter. Pass in an empty string "" as parameter value.
The XML configuration defining a screen object.
Reserved parameter. Pass in an empty string "" as parameter value.
Gets a Screen object instantiated with the specified XML data.
Syntax
'Declaration
 
Public Function requestScreenEx( _ 
   ByVal reserved1 As String, _ 
   ByVal reserved2 As String, _ 
   ByVal xml As String, _ 
   ByVal reserved3 As Integer _ 
) As ScreenUPG
'Usage
 
Dim instance As SessionLoader 
Dim reserved1 As String 
Dim reserved2 As String 
Dim xml As String 
Dim reserved3 As Integer 
Dim value As ScreenUPG 
  
value = instance.requestScreenEx(reserved1, reserved2, xml, reserved3)
public ScreenUPG requestScreenEx( 
   string reserved1,
   string reserved2,
   string xml,
   int reserved3 
)
public: 
ScreenUPG^ requestScreenEx( 
   String^ reserved1,
   String^ reserved2,
   String^ xml,
   int reserved3 
) 

Parameters

reserved1
Reserved parameter. Pass in an empty string "" as parameter value.
reserved2
Reserved parameter. Pass in an empty string "" as parameter value.
xml
The XML configuration defining a screen object.
reserved3
Reserved parameter. Pass in an empty string "" as parameter value.
Exceptions
ExceptionDescription
SessionException Thrown if the requested session specifed by the xml could not be loaded.
Remarks
See XML Parameters for examples and a complete list of parameters for each connection type.
Example
SessionLoader sl = new SessionLoader();
ScreenUPG screen;
            
try
{
	// VT sample XML
	string xml = "<ScreenVt Columns="80" Rows="24">\n" +
					"\t<Telnetcon LocalEcho="false" InitiateNegotiation="false" NegotiateBinary="false">\n" +
						"\t\t<TcpTelnetcon HostName="YOURHOST.YOURCOMPANY.com" PortNumber="23" />\n" +
					"\t</Telnetcon>\n" +
				 "</ScreenVt>\n";
            
	// Request the screen
	screen = sl.requestScreenEx("", "", xml, 0);
}
catch (SessionException se)
{
	// Unable to load configuration based on xml
	System.out.println(se.getMessage());
}
Dim sl As SessionLoader.SessionLoader
Dim screen as ScreenUPG.ScreenUPG
Dim xml As String
Dim dq As String
Dim nl As String
Dim tb As String
            
'Setup up helpers
dq = Chr(34)
nl = Chr(13) + Chr(10)
tb = Chr(9)
            
On error resume next
            
'Get the SessionLoader
Set sl = CreateObject("SessionLoader.SessionLoader")
            
'VT sample XML
xml =  "<ScreenVt Columns=" + dq + "80" + dq + " Rows=" + dq + "24" + dq + ">" + nl
xml = xml + tb + "<Telnetcon LocalEcho=" + dq + "false" + dq + " InitiateNegotiation=" + dq + "false" + dq + " NegotiateBinary=" + dq + "false" + dq + ">" + nl
xml = xml + tb + tb + "<TcpTelnetcon HostName=" + dq + "YOURHOST.YOURCOMPANY.com" + dq + " PortNumber=" + dq + "23" + dq + " />" + nl
xml = xml + tb + "</Telnetcon>" + nl
xml = xml + "</ScreenVt>" + nl
            
'Get the screen object from the specified MCS configuration
Set screen = sl.requestScreenEx("", "", xml, 0)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

SessionLoader Class
SessionLoader Members
requestScreenEx Method