OpenPort


BOOL OpenPort(
    LPTSTR    pName,
    LPHANDLE  pHandle
);

Opens the specified port.

pName

Points to a port name.

pHandle

Points to the memory location into which to put the handle to the opened port.


The port monitor does not need to know the name of the printer that is connected to a port when OpenPort is called, the printer name will be supplied in a subsequent StartDocPort function call.

Note the difference between the port monitor OpenPort function parameter list and the language monitor OpenPortEx function parameter list which specifies both a port name and a printer name.