OnQueryOpen Event

This event fires when third-party serial application tries to open virtual serial port.

Syntax

Visual Basic
Sub OnQueryOpen(pid As Long, Path As String)
Visual C++ (MFC)
void OnQueryOpen(LONG pid, LPCTSTR Path);

Parameters

pid

PID of the application trying to open the port.

Path

Full path to the application trying to open the port.

Remarks

The event fires only if QueryOpen property of the port is set to TRUE. The event handler should decide whether to allow opening a COM port or not to the serial application.
If it is needed to allow the application to open the port, AllowPortOpen method should be called withing the event handler.