interface IUsbClient {
// Properties
readonly ${devicesJs}: ${IDevice}[];
// Methods
${addDevice}(remoteAddress: string, deviceKey: string, authKey?: string): ${IDevice};
${getRemoteSharedDevices#getRemoteSharedDevices1}(remoteAddress: string): ${IRemoteDevice}[];
${installLicenseFile}(path: string): void;
}
public interface IUsbClient
{
// Properties
Array ${devices} { get; }
// Methods
${IDevice} ${addDevice}(string remoteAddress, string deviceKey, object authKey);
Array ${getRemoteSharedDevices}(string remoteAddress);
void ${addListener}(${IUsbClientListener} pListener);
void ${removeListener}(${IUsbClientListener} pListener);
void ${installLicenseFile}(string path);
void ${installLicenseInMemory}(byte[] data);
}
struct IUsbClient : IDispatch
{
// Properties
SAFEARRAY(${IDevice}) ${devices}; // get
// Methods
${IDevicePtr#IDevice} ${addDevice}(_bstr_t remoteAddress, _bstr_t deviceKey, const _variant_t & authKey);
SAFEARRAY(${IRemoteDevice}) ${getRemoteSharedDevices}(_bstr_t remoteAddress);
HRESULT ${addListener}(${IUsbClientListener *#IUsbClientListener} pListener);
HRESULT ${removeListener}(${IUsbClientListener *#IUsbClientListener} pListener);
HRESULT ${installLicenseFile}(_bstr_t path);
HRESULT ${installLicenseInMemory}(SAFEARRAY(BYTE) data);
};
// This property is not available in scripting environment
Array devices { get; }
SAFEARRAY(${IDevice}) devices; // get
Returns a list of all local USB devices. USB devices that are currently disconnected are also included in this list.
readonly devicesJs: ${IDevice}[];
// This property is not available in managed environment
// This property is not available in native environment
Returns a list of all local USB devices. USB devices that are currently disconnected are also included in this list.
addDevice(remoteAddress: string, deviceKey: string, authKey?: string): ${IDevice};
${IDevice} addDevice(string remoteAddress, string deviceKey, object authKey);
${IDevicePtr#IDevice} addDevice(_bstr_t remoteAddress, _bstr_t deviceKey, const _variant_t & authKey);
remoteAddress
deviceKey
authKey
Add a new remote USB device.
// This method is not available in scripting environment
void addListener(${IUsbClientListener} pListener);
HRESULT addListener(${IUsbClientListener *#IUsbClientListener} pListener);
pListener
Adds specified listener object to the list of listener objects. When new USB device is connected, library calls methods of the supplied listener object, passing a reference to a connected device.
// This method is not available in scripting environment
void removeListener(${IUsbClientListener} pListener);
HRESULT removeListener(${IUsbClientListener *#IUsbClientListener} pListener);
pListener
Removes specified listener object from the list of listener objects.
installLicenseFile(path: string): void;
void installLicenseFile(string path);
HRESULT installLicenseFile(_bstr_t path);
path
Install the given license file. Throws an exception if an error occurs.
// This method is not available in scripting environment
void installLicenseInMemory(byte[] data);
HRESULT installLicenseInMemory(SAFEARRAY(BYTE) data);
data
Install the license from the memory buffer.