Attachmate Reflection 2014 .NET API Reference
Start(String,Boolean) Method
Example 


The name of the application instance. This name must be unique among active application instances in order to be reachable by .Net API programs. The channel name must have the same format as a valid Internet hostname. Names can contain only the ASCII letters 'a' through 'z' (in a case-insensitive manner), the digits '0' through '9', and the hyphen ('-'). No other symbols, punctuation characters, or white space are permitted.
The Boolean value that indicates whether the Reflection application is visible.
Starts and names a (visible or invisible) Reflection application instance when the Reflection Workspace "API Settings" .Net API option is enabled.
Syntax
'Declaration
 
Public Overloads Shared Function Start( _
   ByVal channelName As String, _
   ByVal visible As Boolean _
) As Guid
'Usage
 
Dim channelName As String
Dim visible As Boolean
Dim value As Guid
 
value = MyReflection.Start(channelName, visible)
public static Guid Start( 
   string channelName,
   bool visible
)

Parameters

channelName
The name of the application instance. This name must be unique among active application instances in order to be reachable by .Net API programs. The channel name must have the same format as a valid Internet hostname. Names can contain only the ASCII letters 'a' through 'z' (in a case-insensitive manner), the digits '0' through '9', and the hyphen ('-'). No other symbols, punctuation characters, or white space are permitted.
visible
The Boolean value that indicates whether the Reflection application is visible.

Return Value

Reflection instance ID.
Remarks
This method returns an instance ID of type Guid if the call is successful; otherwise an exception is thrown. The returned instance ID uniquely identifies the application instance and is used as an input parameter in ForceStop(Guid instanceId) to stop the instance. (Use the ForceStop() method only after the Close() method fails.)

The channelName parameter can be any valid string.

Use the same channelName string in CreateApplication(channelName) to create an Application object.

Example
The following example shows how to start a new, visible application instance using channelName "myReflection":
class MyApplication
{
   private Guid instanceId;
            
   public void StartReflection()
   {
      instanceId = MyReflection.Start("myReflection", true);
   }
   public void StopReflection()
   {
      MyReflection.Close(ApplicationCloseOption.CloseNoSave);
   }
}
Requirements

Target Platforms: Microsoft Windows 7, Microsoft Windows Vista, Microsoft Windows XP, Microsoft Windows Server 2003 Terminal Services, Microsoft Windows Server 2008 Terminal Services

See Also

Reference

MyReflection Class
MyReflection Members
Overload List

Send Feedback