ClientStartRemoteDevIsolateSession
 ClientStartRemoteDevIsolateUser
 ClientGetSessionIds
 ClientGetCurrentSessionId
 ClientIsIsolationAvailable


ClientStartRemoteDevIsolateSession


BOOL
ClientStartRemoteDevIsolateSession (
IN PVOID pClientContext,
IN long iIndex,
IN VARIANT strPassword,
IN ULONG SessionId
)

 
Routine Description:

 
Initializes client's connection to the server with enabled per-session device isolation.

 
Arguments:

 
pClientContext - remote USB devices context returned by the ClientEnumAvailRemoteDevOnServer or ClientEnumAvailRemoteDev functions.

 
iIndex - serial number of the remote USB device.

 
strPassword - authorization password if required. You can find out whether authorization is required by calling the ClientRemoteDevRequiresAuth function.

 
SessionId - ID of a session in which the remote USB device will be accessible.

 
To get the ID of a current session, call ClientGetCurrentSessionId. To get the list of all sessions, call ClientGetSessionIds.

 
Return Value:

 
True - if the function was executed successfully. False - if an error occurred.

 
Remarks:

 
If you specify the ID of a non-existent session, the device will not be displayed on the remote computer until the corresponding session is created.


ClientStartRemoteDevIsolateUser


BOOL
ClientStartRemoteDevIsolateUser (
IN PVOID pClientContext,
IN long iIndex,
IN BOOL bAutoReconnect,
IN VARIANT strPassword,
IN VARIANT strUsername
)

 
Routine Description:

 
Initializes client's connection to the server with enabled per-user device isolation.

 
Arguments:

 
pClientContext - remote USB devices context returned by the ClientEnumAvailRemoteDevOnServer or ClientEnumAvailRemoteDev functions.

 

iIndex - serial number of the remote USB device.

 
bAutoReconnect - if this parameter is True, reconnection attempts will be made after the connection break. If False - the client disconnects.

 
strPassword - authorization password if required. You can find out whether authorization is required by calling the ClientRemoteDevRequiresAuth function.

 
strUsername - name of a user that will be allowed to access the remote device. You can specify a username associated with a local user account, DOMAIN/USER associated with a domain user account, or an email address associated with a Microsoft user account.

 
Return Value:

 
True - if the function was executed successfully. False - if an error occurred.

 
Remarks:

 
If you specify invalid user information, the connected remote device will not be isolated and will be 
available to all users.


ClientGetSessionIds


BOOL
ClientGetSessionIds (
IN PULONG arrSessionId,
long *iCount
)

 
Routine Description:

 
Gets sessions list

 
Arguments:

 
arrSessionId - address of a buffer to receive an array of session IDs. If this value is set to NULL, the function returns the number of elements in the array arrSessionId to iCount.

 
iCount - a pointer to a value that receives the number of elements in the array arrSessionId.

 
Return Value:

 
True - if the function was executed successfully. False - if an error occurred. To get extended error information, call the GetLastError 
function.


ClientGetCurrentSessionId


BOOL
ClientGetCurrentSessionId (
OUT ULONG *pSessionId
)

 
Routine Description:

 
Gets current session ID. By calling this function, you can receive the ID of your current session that can
be used when calling the ClientStartRemoteDevIsolateSession function.

 
Arguments:

 
pSessionId - a pointer to a value that receives current session ID.

 
Return Value:

 
True - if the function was executed successfully. False - if an error occurred.


ClientIsIsolationAvailable


BOOL
ClientIsIsolationAvailable (
OUT BOOL *bIsolation
)

 
Routine Description:

 
Checks whether the Device Isolation Components are installed

 
Arguments:

 
bIsolation - a pointer to a value that receives the result. True if the Device
Isolation Components are installed, otherwise the False value is returned.

 
Return Value:

 
True - if the function was executed successfully. False - if an error occurred.