Retrieves value of QueryOpen flag.
BOOL FtVspcGetQueryOpenByNum( UINT unPortNo, BOOL* lpbQueryOpen );
[in] The number of virtual serial port.
[out] A pointer to the variable where the QueryOpen flag of virtual serial port is returned.
|The operation has not been completed.
|There is no such port.
|This port is marked for deletion.
QueryOpen flag allows the developer to react on virtual serial port opening. So, your application can allow or prohibit access to the serial port.
If QueryOpen is FALSE, the port can be open by any application.
If QueryOpen is TRUE, it is still not possible to open port if your application is not attached to the port (refer to FtVspcAttach). ERROR_ACCESS_DENIED error code is returned in such case. If attached, ftvspcPortEventQueryOpen event fires and the event handler decides, if it is allowed to open virtual serial port to the application or not.