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.
This method creates new unconnected virtual serial device. This device should be later connected to one of the transport 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.
While at least one reference to the device is hold by an application, the library guarantees that the same device obtained during enumeration will have the same interface pointer. After the application releases its last reference and then performs an enumeration again, library can no longer guarantee that the same in-memory object will represent the same virtual device.
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.