MONITOR


typedef struct _MONITOR {
     BOOL (WINAPI *pfnEnumPorts)(LPTSTR pName,DWORD Level,LPBYTE  pPorts, 
         DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned);
    BOOL (WINAPI *pfnOpenPort)(LPTSTR  pName,PHANDLE pHandle);
    BOOL (WINAPI *pfnOpenPortEx)(LPTSTR  pPortName, 
        LPTSTR  pPrinterName, PHANDLE pHandle, struct _MONITOR 
        FAR *pMonitor);
    BOOL (WINAPI *pfnStartDocPort)(HANDLE  hPort, LPTSTR  pPrinterName, 
        DWORD   JobId, DWORD   Level, LPBYTE  pDocInfo);
    BOOL (WINAPI *pfnWritePort)(HANDLE  hPort, LPBYTE  pBuffer, 
        DWORD   cbBuf, LPDWORD pcbWritten);
    BOOL (WINAPI *pfnReadPort)(HANDLE hPort, LPBYTE pBuffer, 
        DWORD  cbBuffer, LPDWORD pcbRead);
    BOOL (WINAPI *pfnEndDocPort)(HANDLE   hPort);
    BOOL (WINAPI *pfnClosePort)(HANDLE  hPort);
    BOOL (WINAPI *pfnAddPort)(LPTSTR   pName, HWND    hWnd, 
        LPTSTR   pMonitorName);
    BOOL (WINAPI *pfnConfigurePort)(LPTSTR   pName, HWND  hWnd, 
        LPTSTR pPortName);
    BOOL (WINAPI *pfnDeletePort)(LPTSTR   pName, HWND    hWnd, 
        LPTSTR   pPortName);
    BOOL (WINAPI *pfnGetPrinterDataFromPort)(HANDLE hPort, 
        DWORD ControlID, LPTSTR  pValueName, LPTSTR  lpInBuffer, 
        DWORD   cbInBuffer, LPTSTR  lpOutBuffer, DWORD   cbOutBuffer, 
        LPDWORD lpcbReturned);
    BOOL (WINAPI *pfnSetPortTimeOuts)(HANDLE  hPort, 
        LPCOMMTIMEOUTS lpCTO, DWORD reserved); 
} MONITOR, FAR *LPMONITOR;

When InitializeMonitorEx is called to initialize a language monitor, the caller provides a pointer to an empty MONITOR structure, which is filled in and returned by the language monitor.