AssignConnection(ConnectionType) method
The AssignConnection(Connection Type) method places the requested connection
type on the host object’s list of assigned connection types and makes it the current
connection type when processing subsequent device-specific method calls.
If the requested connection type is already on the list of assigned connections,
the list of assigned connections does not change. Only the current connection
type is changed to the requested type. It is normal to call the AssignConnection
method on the same object multiple times in the course of getting and setting
connection-specific values.
AssignConnection returns TRUE if the connection type that is passed in exists on
the computer and is either successfully assigned or already assigned. It returns
FALSE if either the requested connection type does not exist on the computer or
the current assigned connection count is already at the maximum allowed level.
A pcAnywhere host object can support up to two assigned connection types. The
AssignConnection method returns FALSE if it detects an attempt to exceed this
limit.
The following table defines the AssignConnection parameter:
Description
Parameter
The name of a connection device type to be assigned
ConnectionType as
string
The following table defines the AssignConnection return value:
Description
Return value
TRUE if this device type is available and the maximum allowed
assigned connection count has not already been reached
Boolean
UnassignConnection(ConnectionType) method
The UnassignConnection(Connection Type) method returns TRUE if the connection
type that is passed in is successfully removed from the list of assigned connection
types.
The following table defines the UnassignConnection parameter:
Description
Parameter
The name of a connection device type to be unassigned
ConnectionType as
string
41
Visual Basic object definitions
CHostData properties