BOOL (WINAPI *pfnAddPort)(
LPWSTR pName, | |
HWND hWnd, | |
LPWSTR pMonitorName | |
); |
AddPort creates a port and adds it to the list of ports currently supported by the specified monitor in the spooler environment.
The return value is TRUE if the function is successful, and FALSE otherwise.
The spooler calls AddPort when it receives an application request to add a port to its environment. The spooler forwards the call to the named monitor on the named server.
AddPort allows a port to be added interactively. A monitor should prompt a user to enter the port name in a dialog box on the window associated with hWnd. AddPort should validate the entered port name by calling the Win32 EnumPorts function to ensure that no duplicate port names are added to the spooler environment. A monitor should also verify that the port is one that it supports.
The spooler does not support remote AddPort calls. Consequently, AddPort implementations can ignore the pName and pMonitorName parameters.
AddPort is a port management function that must be implemented by port monitors and LMPMs. Pure language monitors should not implement this function.