OnQueryOpen Event

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


Visual Basic .NET
Sub OnQueryOpen(ByVal pid As UInt32, ByVal Path As String)
Visual C#
void OnQueryOpen(UInt32 pid, String Path);



PID of the application trying to open the port.


Full path to the application trying to open the port.


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.