● ClientEnumAvailRemoteDevOnServer
● ClientEnumAvailRemoteDevOnServerTimeout
● ClientEnumAvailRemoteDev
● ClientRemoveEnumOfRemoteDev
● ClientGetRemoteDevNetSettings
● ClientGetRemoteDevName
● ClientGetStateSharedDevice
● ClientGetConnectedDevValueByName
● ClientGetRemoteDevValueByName
● ClientAddRemoteDevManually
● ClientAddRemoteDevManuallyEx
● ClientAddRemoteDev
● ClientAddRemoteDevEx
● ClientStartRemoteDev
● ClientStopRemoteDev
● ClientRemoveRemoteDev
● ClientGetStateRemoteDev
● ClientTrafficRemoteDevIsEncrypted
● ClientRemoteDevRequiresAuth
● ClientEnumRemoteDevOverRdp
● ClientTrafficRemoteDevIsCompressed
● ClientRemoteDevDisconnect
● ClientRemoteDisconnectIsEnabled
● ClientGetRdpAutoconnect
● ClientSetRdpAutoconnect
● ClientSetHidDeviceOptimization
● ClientGetHidDeviceOptimization
● ClientEnableAdvancedVirtualHub
● ClientAdvancedVirtualHubIsEnabled
● ClientSetOnlyAdvancedVirtualHub
● ClientGetOnlyAdvancedVirtualHub
ClientEnumAvailRemoteDevOnServer
BOOL ClientEnumAvailRemoteDevOnServer (
IN VARIANT szServer,
OUT PVOID *ppFindContext
);
Routine Description:
Creates an enumerator of all shared USB devices on the remote server.
Arguments:
szServer - the name of the server for which the enumerator of all shared USB devices is created.
ppFindContext - a pointer to the remote USB devices context used in subsequent operations with devices.
Return Value:
True - if the remote server exists, and enumerator of all shared USB devices was created. Otherwise the "False" value is returned.
ClientEnumAvailRemoteDevOnServerTimeout
IN VARIANT szServer,
OUT PVOID *ppFindContext,
IN DWORD dwTimeoutMs
)
Routine Description:
Creates an enumerator of all shared USB devices on the remote server with the specified timeout.
Arguments:
szServer - the name of the server for which the enumerator of all shared USB devices is created.
ppFindContext - a pointer to the remote USB devices context used in subsequent operations with devices.
dwTimeoutMs - timeout to connect to remote server, in milliseconds.
Return Value:
True - if the remote server exists, and enumerator of all shared USB devices was created.
False - if remote server is offline or didn't accept connection within the specified timeout.
ClientEnumAvailRemoteDev
BOOL ClientEnumAvailRemoteDev (
OUT PVOID *ppFindContext
);
Routine Description:
Creates an enumerator of all remote USB devices on the server.
Arguments:
ppFindContext - a pointer to the remote USB devices context used in subsequent operations with devices.
Return Value:
True - if the function was executed successfully. Otherwise the "False" value is returned.
ClientRemoveEnumOfRemoteDev
BOOL ClientRemoveEnumOfRemoteDev (
IN PVOID pFindContext
);
Routine Description:
Removes remote USB devices enumerator.
Arguments:
pFindContext - remote USB devices context returned by the ClientEnumAvailRemoteDevOnServer or ClientEnumAvailRemoteDev functions.
Return Value:
True - if the function was executed successfully. Otherwise the "False" value is returned.
ClientGetRemoteDevNetSettings
BOOL ClientGetRemoteDevNetSettings (
IN PVOID pFindContext,
IN long iIndex,
OUT VARIANT *NetSettings
);
Routine Description:
Gets network settings for the remote USB device.
Arguments:
pFindContext - remote USB devices context returned by the ClientEnumAvailRemoteDevOnServer or
ClientEnumAvailRemoteDev functions.
iIndex - serial number of the remote USB device.
NetSettings - a pointer to string variable to which information about network settings of the remote USB device is returned. If a full network path is set ("host_name:tcp_port"), it is a standard network connection. If only "tcp_port" is set, it is a callback connection, and the client is waiting for the incoming connection
from the server.
Return Value:
True - if the function was executed successfully. Otherwise the "False" value is returned.
ClientGetRemoteDevName
BOOL ClientGetRemoteDevName (
IN PVOID pFindContext,
IN long iIndex,
OUT VARIANT *strName
);
Routine Description:
Gets remote USB device name.
Arguments:
pFindContext - remote USB devices context returned by the ClientEnumAvailRemoteDevOnServer or ClientEnumAvailRemoteDev functions.
iIndex - serial number of the remote USB device.
strName - a pointer to string variable to which the name of the remote USB device is returned.
Return Value:
True - if the function was executed successfully. Otherwise the "False" value is returned.
ClientGetStateSharedDevice
BOOL
ClientGetStateSharedDevice (
IN PVOID pClientContext,
IN LONG iIndex,
LONG *piState,
VARIANT *RemoteHost
);
Routine Description:
This function requests the current status of shared remote device from the remote server.
Arguments:
pClientContext - remote USB devices context returned by the ClientEnumAvailRemoteDevOnServer or
ClientEnumAvailRemoteDev functions.
iIndex - serial number of the remote USB device.
piState - returns the current status of the shared USB device:
1 – the device is waiting for connection;
2 – the device is already connected.
RemoteHost - the name or IP address of the client connected to the shared port. Valid only when piState
= 2
ClientGetConnectedDevValueByName
BOOL
ClientGetConnectedDevValueByName (
IN PVOID pClientContext,
IN long iIndex,
IN VARIANT strInfoName,
OUT VARIANT *pVarInfo
)
Routine Description:
Returns the name of the value for the connected remote USB device.
Arguments:
pClientContext - remote USB devices context returned by ClientEnumAvailRemoteDev.
iIndex - serial number of the remote USB device.
strValueName - name of the value in question.
pValue - pointer to the output value.
Return Value:
True - if the function was executed successfully. False - if an error occurred.
Notes:
Supported value names are:
NAME (string) | name of the USB device |
NICK (string) | user description of the USB device |
AUTH (bool) | authorization |
ENCR (bool) | encryption |
COMPR (bool) | compression |
STATUS (int) | connection status (for shared USB devices) |
SHARED_WITH (string) | client connected to the shared USB device |
USBHUB (string) | USB hub name |
USBPORT (string) | USB port name |
USBLOC (string) | USB port location |
USBCLASS (string) | USB device class three-byte combination which consists of a single hex-ASCII string of xxyyzz view, where xx=class, yy=subclass, zz=protocol |
ClientGetRemoteDevValueByName
BOOL
ClientGetRemoteDevValueByName (
IN PVOID pClientContext,
IN long iIndex,
IN VARIANT strValueName,
OUT VARIANT *pValue
)
Routine Description:
Returns the name of the value for the remote USB device.
Arguments:
pClientContext - remote USB devices context returned by the ClientEnumAvailRemoteDevOnServer or
ClientEnumAvailRemoteDev or ClientEnumRemoteDevOverRdp functions.
iIndex - serial number of the remote USB device.
strValueName - name of the value in question.
pValue - pointer to the output value.
Return Value:
True - if the function was executed successfully. False - if an error occurred.
Notes:
- The function returns cached data for the remote USB device.
- Supported value names are:
NAME (string) | name of the USB device |
NICK (string) | user description of the USB device |
AUTH (bool) | authorization |
ENCR (bool) | encryption |
COMPR (bool) | compression |
STATUS (int) | connection status (for shared USB devices) |
SHARED_WITH (string) | client connected to the shared USB device |
ALLOW_RDISCONN (bool) | allow disconnection of remote clients from the shared USB device by other clients |
SBHUB (string) | USB hub name |
USBPORT (string) | USB port name |
AUTO_ADDED (bool) | add USB device automatically on connection |
USBCLASS (string) | USB device class triple as single hex-ascii string xxyyzz (where xx=class, yy=subclass, zz=protocol) |
BCDUSB (uint) | version of the USB specification |
VID (uint) | vendor identifier for the device |
PID (uint) | product identifier |
REV (uint) | version of the device |
SERIAL (string) | serial number of the device |
USBLOC (string) | USB port location |
Return Value:
True - if the function was executed successfully. False - if an error occurred.
ClientAddRemoteDevManually
BOOL ClientAddRemoteDevManually (
IN VARIANT szNetSettings
);
Routine Description:
Is used to add a remote USB device to the list manually. This function is required when adding a remote USB device, which initializes callback connection, and if the server is not in the same network with the client. If network settings are known, remote USB devices with standard connection type also can be added. For example:
localhost:5000 – standard client;
5000 – callback client.
Arguments:
szNetSettings - network settings for the remote USB device. If a full network path is set
("host_name:tcp_port"), it is a standard network connection. If only "tcp_port" is set, it is a callback
connection, and the client is waiting for the incoming connection from the server.
Return Value:
True - if the function was executed successfully. False - if an error occurred.
ClientAddRemoteDevManuallyEx
BOOL
ClientAddRemoteDevManuallyEx (
IN VARIANT szNetSettings,
IN BOOL bRemember,
IN BOOL bAutoAdded
)
Routine Description:
Adds remote USB device to the list manually. See ClientAddRemoteDevManually for details. Allows the
caller to control how USB service should save settings to non-volatile memory.
Arguments:
szNetSettings - network settings for the remote USB device. If a full network path is set
("host_name:tcp_port"), it is a standard network connection.
If only "tcp_port" is set, it is a callback connection, and the client is waiting for the incoming connection
from the server.
bRemember - if TRUE, new client is added to non-volatile settings of USB service and will be reactivated
after restart.
bAutoAdded - flag to indicate whether device was added implicitly (saved to non-volatile memory and can
be later asked with ClientGetRemoteDevValueByName).
Return Value:
True - if the function was executed successfully. False - if an error occurred.
ClientAddRemoteDev
BOOL
ClientAddRemoteDev (
IN PVOID pClientContext,
IN long iIndex,
)
Routine Description:
Adds remote USB device to the list.
Arguments:
pClientContext - remote USB devices context returned by the ClientEnumAvailRemoteDevOnServer function.
iIndex - serial number of the remote USB device.
Return Value:
True - if the function was executed successfully. False - if an error occurred.
ClientAddRemoteDevEx
BOOL
ClientAddRemoteDevEx (
IN PVOID pClientContext,
IN long iIndex,
IN BOOL bRemember,
IN BOOL bAutoAdded
)
Routine Description:
Adds remote USB device to the list. Allows the caller to control how USB service should save settings to non-volatile memory.
Arguments:
pFindContext - remote USB devices context returned by the ClientEnumAvailRemoteDevOnServer.
iIndex - serial number of the remote USB device.
bRemember - if TRUE, new client is added to non-volatile settings of USB service and will be reactivated after restart.
bAutoAdded - flag to indicate whether device was added implicitly (saved to non-volatile memory and can be later asked with ClientGetRemoteDevValueByName).
Return Value:
True - if the function was executed successfully. False – if an error occurred.
ClientStartRemoteDev
BOOL ClientStartRemoteDev (
IN PVOID pClientContext,
IN long iIndex,
IN BOOL bAutoReconnect,
IN VARIANT strPassword
);
Routine Description:
Initializes client’s connection to the server.
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.
Return Value:
True - if the function was executed successfully. False - if an error occurred.
ClientStopRemoteDev
BOOL ClientStopRemoteDev (
IN PVOID pClientContext,
IN long iIndex,
);
Routine Description:
Stops connection of the remote USB device to the server.
Arguments:
pClientContext - remote USB devices context returned by the ClientEnumAvailRemoteDevOnServer or ClientEnumAvailRemoteDev functions.
iIndex - serial number of the remote USB device.
Return Value:
True - if the function was executed successfully. False - if an error occurred.
ClientRemoveRemoteDev
BOOL ClientRemoveRemoteDev (
IN PVOID pClientContext,
IN long iIndex,
);
Routine Description:
Removes the remote USB device from the list.
Arguments:
pClientContext - remote USB devices context returned by the ClientEnumAvailRemoteDevOnServer or
ClientEnumAvailRemoteDev functions.
iIndex - serial number of the remote USB device.
Return Value:
True - if the function was executed successfully. False - if an error occurred.
ClientGetStateRemoteDev
BOOL ClientGetStateRemoteDev (
IN PVOID pClientContext,
IN long iIndex,
OUT LONG *piState,
OUT VARIANT *RemoteHost
);
Routine Description:
Gets the current status of client connection to the remote USB device.
Arguments:
pClientContext - remote USB devices context returned by the ClientEnumAvailRemoteDevOnServer or ClientEnumAvailRemoteDev functions.
iIndex - serial number of the remote USB device.
piState - a pointer to long variable to which the current connection status is returned:
0 – the client is not connected to the device;
2 – the client is connected to the device.
RemoteHost - a pointer to string variable to which the name of the remote host, currently connected to the server, is returned. This parameter is set when piState is 2.
Return Value:
True - if the function was executed successfully. False - if an error occurred.
ClientTrafficRemoteDevIsEncrypted
BOOL ClientTrafficRemoteDevIsEncrypted (
IN PVOID pClientContext,
IN long iIndex,
OUT BOOL *bCrypt
);
Routine Description:
Determines whether network traffic for the remote USB device is encrypted.
Arguments:
pClientContext - remote USB devices context returned by the ClientEnumAvailRemoteDevOnServer or ClientEnumAvailRemoteDev functions.
iIndex - serial number of the remote USB device.
bCrypt – a pointer to a boolean variable to which information about network traffic encryption is returned. True - if network traffic is encrypted. Otherwise the "False" value is returned.
Return Value:
True - if the function was executed successfully. Otherwise the "False" value is returned.
ClientRemoteDevRequiresAuth
BOOL ClientRemoteDevRequiresAuth (
IN PVOID pClientContext,
IN long iIndex,
OUT BOOL *bAuth
);
Routine Description:
Determines whether authorization is required to establish a connection with the remote USB device.
Arguments:
pClientContext - remote USB devices context returned by the ClientEnumAvailRemoteDevOnServer or ClientEnumAvailRemoteDev functions.
iIndex - serial number of the remote USB device.
bAuth - a pointer to a boolean variable to which information about authorization is returned. True - if authorization is required. Otherwise the "False" value is returned.
Return Value:
True - if the function was executed successfully. Otherwise the "False" value is returned.
ClientEnumRemoteDevOverRdp
BOOL
ClientEnumRemoteDevOverRdp (
OUT PVOID *ppFindContext
);
Routine Description:
This function enumerates all remote devices currently available over RDP.
Return Value:
True - if the function was executed successfully.
False - if an error occurred.
ClientTrafficRemoteDevIsCompressed
BOOL ClientTrafficRemoteDevIsCompressed (
IN PVOID pClientContext,
IN long iIndex,
OUT BOOL *bCompress
);
Routine Description:
Determines whether network traffic for the remote shared USB device is compressed.
Arguments:
pClientContext - remote USB devices context returned by the ClientEnumAvailRemoteDevOnServer or ClientEnumAvailRemoteDev functions.
iIndex - serial number of the remote USB device.
bCompress – is True if network traffic is compressed. Otherwise the "False" value is returned.
Return Value:
True if network traffic for the remote shared USB device is compressed. Otherwise the "False" value is returned.
ClientRemoteDevDisconnect
ClientRemoteDevDisconnect (
IN PVOID pClientContext,
IN long iIndex,
)
Routine Description:
Stops connection of the remote USB device to the remote server.
Arguments:
pClientContext - remote USB devices context returned by the ClientEnumAvailRemoteDevOnServer or ClientEnumAvailRemoteDev functions.
iIndex - serial number of the remote USB device.
Return Value:
True - if the function was executed successfully. False - if an error occurred.
ClientRemoteDisconnectIsEnabled
BOOL
ClientRemoteDisconnectIsEnabled (
IN PVOID pClientContext,
IN long iIndex,
OUT BOOL *bEnable
)
Routine Description:
Determines whether to allow the client to be disconnected by another client.
Arguments:
pClientContext - remote USB devices context returned by the ClientEnumAvailRemoteDevOnServer or ClientEnumAvailRemoteDev functions.
iIndex - serial number of the remote USB device.
bEnable – is True if the client is enabled to be disconnected by another client.
Return Value:
True - if the function was executed successfully. False - if an error occurred.
ClientGetRdpAutoconnect
BOOL
ClientGetRdpAutoconnect (void)
Routine Description:
Gets status of RDP auto-connect option.
Arguments:
None.
Return Value:
True - if RDP auto-connect option is enabled.
ClientSetRdpAutoconnect
BOOL
ClientSetRdpAutoconnect (
IN BOOL bEnableAutoconnect
)
Routine Description:
Enables or disables RDP auto-connect option.
Arguments:
bEnableAutoconnect – enables RDP auto-connection, if set to TRUE;
Disables RDP auto-connection, if set to FALSE.
Return Value:
True - if the function was executed successfully. False - if an error occurred.
ClientSetHidDeviceOptimization
BOOL
ClientSetHidOptimize(
BOOL bEnable
)
Routine Description:
Enables or disables the option to optimize HID device responsiveness.
Arguments:
bEnable - enables the option if set to TRUE; disables the option if set to FALSE.
With this option enabled, USB Network Gate will not require waiting for a confirmation of successful data receipt by device over the network, therefore increasing the speed of interaction with remote USB HID devices, e.g. USB keyboards and mice.
Return Value:
True - if the function was executed successfully. False - if an error occurred.
ClientGetHidDeviceOptimization
BOOL
ClientGetHidOptimize(void)
Routine Description:
Returns whether the option to optimize HID device responsiveness is enabled.
With this option enabled, USB Network Gate will not require waiting for a confirmation of successful data receipt by device over the network, therefore increasing the speed of interaction with remote USB HID devices, e.g. USB keyboards and mice.
Arguments:
None.
Return Value:
True - if the option to optimize HID device responsiveness is enabled.
ClientEnableAdvancedVirtualHub
BOOL
ClientEnableUsb3Hub(
BOOL bEnable
)
Routine Description:
Enables or disables the option to always connect USB 3.0 devices via the advanced virtual hub.
If upon new connection a device is identified as a USB 3.0 device, it will be automatically connected via the advanced virtual USB hub with USB 3.0 support. This will allow the best possible connection speed.
Arguments:
bEnable - if set to TRUE, USB 3.0 devices will always connect via the advanced virtual hub.
Return Value:
True - if the function was executed successfully. False - if an error occurred.
ClientAdvancedVirtualHubIsEnabled
BOOL
ClientIsEnableUsb3Hub(void)
Routine Description:
Returns whether the option to always connect USB 3.0 devices via the advanced virtual hub is enabled.
Arguments:
None.
Return Value:
True - if the option to always connect USB 3.0 devices via the advanced virtual hub is enabled.
ClientSetOnlyAdvancedVirtualHub
BOOL
ClientSetOnlyUsb3Hub(
BOOL bEnable
)
Routine Description:
Enables or disables the option to connect all USB devices via the advanced virtual hub.
With this option enabled, all remote connections will be established via the advanced virtual USB hub that provides USB 3.0 support.
Arguments:
bEnable - if set to TRUE, all USB devices will connect via the advanced virtual hub.
Return Value:
True - if the function was executed successfully. False - if an error occurred.
ClientGetOnlyAdvancedVirtualHub
BOOL
ClientGetOnlyUsb3Hub(void)
Routine Description:
Returns whether the option to connect all USB devices via the advanced virtual hub is enabled.
Arguments:
None.
Return Value:
True - if the option to connect all USB devices via the advanced virtual hub is enabled.