This interface must be implemented by the library user if he wants to receive notification events. It is used only for native clients, while scripting clients may use the added, deleted and changed events.
The client must register its object with a library by calling the IVirtualSerialLibrary.addListener method and remove it by calling the IVirtualSerialLibrary.removeListener method. Failing to do so may result in circular references and in memory leaks.
This interface cannot be used by scripting clients.
// This interface is not available in scripting environment
public interface IVirtualSerialLibraryListener
{
// Methods
void ${added}(Array devices);
void ${deleted}(Array devices);
void ${changed}(${IVirtualSerialDevice} device, ${ChangeMode} mode);
}
struct IVirtualSerialLibraryListener : IDispatch
{
// Methods
HRESULT ${added}(SAFEARRAY(${IVirtualSerialDevice}) devices);
HRESULT ${deleted}(SAFEARRAY(${IVirtualSerialDevice}) devices);
HRESULT ${changed}(${IVirtualSerialDevice} * device, ${ChangeMode} mode);
};
// This method is not available in scripting environment
void added(Array devices);
HRESULT added(SAFEARRAY(${IVirtualSerialDevice}) devices);
devices
This method is invoked when new virtual serial device(s) appear on the system.
// This method is not available in scripting environment
void deleted(Array devices);
HRESULT deleted(SAFEARRAY(${IVirtualSerialDevice}) devices);
devices
This method is invoked when virtual serial device(s) are deleted from the system.
// This method is not available in scripting environment
void changed(${IVirtualSerialDevice} device, ${ChangeMode} mode);
HRESULT changed(${IVirtualSerialDevice} * device, ${ChangeMode} mode);
device
mode
This method is called when virtual serial device device
state is changed to mode
.