Virtual Serial Ports
Virtual Serial Ports - Software Virtual COM Port Null Modem Cable Emulator for Windows

IVirtualSerialLibrary.createDevice Method

HHD Software - Hex Editor Serial Port Monitor USB Protocol Analyzer Network Monitor
 
 
 
< PreviousTopNext >
Declaration
createDevice(portName?: string): IVirtualSerialDevice;
Remarks

This method creates new unconnected virtual serial device. This device should be later connected to one of the transports in order to be used.

When last reference to the device is released, the device is not deleted. To delete a device, call IVirtualSerialDevice.deleteDevice method and then release a reference.

The calling application must have required privileges in order to be able to create a device instance on the target computer for this method to work successfully. Otherwise, the "Access Denied" error is returned. When UAC is turned on, the calling application must have already elevated itself before calling this method.

It is allowed to call this method from 32-bit application on 64-bit operating system. In this case, the library uses a proxy to perform device creation in the context of 64-bit process. This is performed transparently for the calling application. The same security and elevation requirements apply in this case.

Native only: This method returns S_OK if device has been successfully created, S_FALSE if device has been created, but restart is required to complete installation. Otherwise, standard COM error code is returned.

Parameters
portName?: string
Optional port name in the form of "COMxxx" where xxx is the number from 1 to 255. If the requested port is taken or the parameter is omitted, another port number will be used automatically.
Return Value
A reference to newly created device.

See Also

  • IVirtualSerialDevice.deleteDevice
  • IVirtualSerialLibrary
  • IVirtualSerialDevice
< PreviousTopNext >
Copyright © 2015 HHD Software. All rights reserved.