Gets a Screen object instantiated with the specified XML data.


Namespace: SessionLoader
Assembly: SessionLoader (in SessionLoader.dll)

Syntax

Visual Basic (Declaration)
Public Function requestScreenEx( _ 
   ByVal reserved1 As String,  _ 
   ByVal reserved2 As String,  _ 
   ByVal xml As String,  _ 
   ByVal reserved3 As Integer _ 
) As ScreenUPG
C#
public ScreenUPG requestScreenEx(
   string reserved1,
   string reserved2,
   string xml,
   int reserved3
)
C++
public:
 ScreenUPG requestScreenEx(
   String reserved1,
   String reserved2,
   String xml,
   int reserved3
) sealed 
J#
public ScreenUPG requestScreenEx(
   string reserved1,
   string reserved2,
   string xml,
   int reserved3
)
JScript
public  function requestScreenEx(
   reserved1 : String,
   reserved2 : String,
   xml : String,
   reserved3 : int
) : ScreenUPG

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

Exception TypeCondition
T: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

[C#]

 Copy Code
            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());
            }
            
[VB]
 Copy Code
            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) 
            

See Also