u2ec.dll is a dynamic link library which allows you to control USB devices either on the server or on the client machine directly from your own application. This lets you share or unshare USB devices, add or remove remote shared USB devices on client machines on the go without using standard configuration utility with GUI.

 

u2ec.dll should be placed in the same folder with the application which uses it. If you develop a 64-bit application, use u2ec64.dll instead, which is supplied with USB Network Gate.

 

u2ec64.dll should be renamed to u2ec.dll.
u2ec.dll gives you access to the following functions:

 

Functions to manage the server side:

  
 ServerCreateEnumUsbDev
 ServerRemoveEnumUsbDev
 ServerGetUsbDevFromHub
 ServerUsbDevIsHub
 ServerUsbDevIsShared
 ServerUsbDevIsConnected
 ServerGetUsbDevName
 ServerGetUsbDevNameEx
 ServerShareUsbDev
 ServerShareUsbWithPredefinedValues
 ServerUnshareUsbDev
 ServerUnshareAllUsbDev
 ServerGetUsbDevStatus
 ServerGetUsbDevClassCode
 ServerGetUsbDevValueByName
 ServerGetSharedUsbDevNetSettings
 ServerGetSharedUsbDevIsCrypt
 ServerGetSharedUsbDevRequiresAuth
 ServerGetSharedUsbDevIsCompressed
 ServerDisconnectRemoteDev
 ServerAllowDevRemoteDisconnect
 SeverGetLastError
 ServerSetDevUserDescription
 ServerSetSharedUsbDevAuth
 ServerSetSharedUsbDevCompress
 ServerSetSharedUsbDevCrypt
 ServerSetUsbDevValueByName

 

Functions to manage the client side:

 
 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

 

Deprecated functions:

 
 ClientGetRdpIsolation
 ClientSetRdpIsolation

 

Please use the device isolation functions instead.

 
Device isolation functions:

 
 ClientStartRemoteDevIsolateSession
 ClientStartRemoteDevIsolateUser
 ClientGetSessionIds
 ClientGetCurrentSessionId
 ClientIsIsolationAvailable

 

Functions to get the license info:

 
 LicenseIsOk
 LicenseGetInfoValueByName

  

Events:

  
 SetCallBackOnChangeDevList
 SetCallBackOnLicenseStatusChange
 CheckUsbService
 UpdateUsbTree