MONITOR2
Collapse the table of content
Expand the table of content

MONITOR2 structure

The MONITOR2 structure contains pointers to the functions defined by print monitors.

Syntax


typedef struct _MONITOR2 {
  DWORD cbSize;
  BOOL  (WINAPI *pfnEnumPorts)(
      HANDLE hMonitor, 
      LPWSTR pName, 
      DWORD Level, 
      LPBYTE pPorts, 
      DWORD cbBuf, 
      LPDWORD pcbNeeded, 
      LPDWORD pcReturned);
  BOOL  (WINAPI *pfnOpenPort)(
      HANDLE hMonitor, 
      LPWSTR pName, 
      PHANDLE pHandle);
  BOOL  (WINAPI *pfnOpenPortEx)(
      HANDLE hMonitor, 
      HANDLE hMonitorPort, 
      LPWSTR pPortName, 
      LPWSTR pPrinterName, 
      PHANDLE pHandle, 
      struct _MONITOR2 * pMonitor2);
  BOOL  (WINAPI *pfnStartDocPort)(
      HANDLE hPort, 
      LPWSTR 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)(
      HANDLE hMonitor, 
      LPWSTR pName, 
      HWND hWnd, 
      LPWSTR pMonitorName);
  BOOL  (WINAPI *pfnAddPortEx)(
      HANDLE hMonitor, 
      LPWSTR pName, 
      DWORD Level, 
      LPBYTE lpBuffer, 
      LPWSTR pMonitorName);
  BOOL  (WINAPI *pfnConfigurePort)(
      HANDLE hMonitor, 
      LPWSTR pName, 
      HWND hWnd, 
      LPWSTR pPortName);
  BOOL  (WINAPI *pfnDeletePort)(
      HANDLE hMonitor, 
      LPWSTR pName, 
      HWND hWnd, 
      LPWSTR pPortName);
  BOOL  (WINAPI *pfnGetPrinterDataFromPort)(
      HANDLE hPort, 
      DWORD ControlID, 
      LPWSTR pValueName, 
      LPWSTR lpInBuffer, 
      DWORD cbInBuffer, 
      LPWSTR lpOutBuffer, 
      DWORD cbOutBuffer, 
      LPDWORD lpcbReturned);
  BOOL  (WINAPI *pfnSetPortTimeOuts)(
      HANDLE hPort, 
      LPCOMMTIMEOUTS lpCTO, 
      DWORD reserved);
  BOOL  (WINAPI *pfnXcvOpenPort)(
      HANDLE hMonitor, 
      LPCWSTR pszObject, 
      ACCESS_MASK GrantedAccess, 
      PHANDLE phXcv);
  DWORD (WINAPI *pfnXcvDataPort)(
      HANDLE hXcv, 
      LPCWSTR pszDataName, 
      PBYTE pInputData, 
      DWORD cbInputData, 
      PBYTE pOutputData, 
      DWORD cbOutputData, 
      PDWORD pcbOutputNeeded);
  BOOL  (WINAPI *pfnXcvClosePort)(HANDLE hXcv);
  VOID  (WINAPI *pfnShutdown)(HANDLE hMonitor);
  DWORD (WINAPI *pfnSendRecvBidiDataFromPort)(
      HANDLE hPort, 
      DWORD dwAccessBit, 
      LPCWSTR pAction, 
      PBIDI_REQUEST_CONTAINER pReqData, 
      PBIDI_RESPONSE_CONTAINER* ppResData);
} MONITOR2, *PMONITOR2, *LPMONITOR2;

Members

cbSize

Specifies the size, in bytes, of the MONITOR2 structure.

pfnEnumPorts

Pointer to the print monitor's EnumPorts function. (Port monitors only.)

pfnOpenPort

Pointer to the print monitor's OpenPort function.

pfnOpenPortEx

Pointer to the print monitor's OpenPortEx function. (Language monitors only.)

pfnStartDocPort

Pointer to the print monitor's StartDocPort function.

pfnWritePort

Pointer to the print monitor's WritePort function.

pfnReadPort

Pointer to the print monitor's ReadPort function.

pfnEndDocPort

Pointer to the print monitor's EndDocPort function.

pfnClosePort

Pointer to the print monitor's ClosePort function.

pfnAddPort

(Obsolete. Must be NULL.) Pointer to the print monitor's AddPort function.

pfnAddPortEx

(Obsolete. Must be NULL.) Pointer to the print monitor's AddPortEx function. (Port monitors only.)

pfnConfigurePort

(Obsolete. Must be NULL.) Pointer to the print monitor's ConfigurePort function.

pfnDeletePort

(Obsolete. Must be NULL.) Pointer to the print monitor's DeletePort function.

pfnGetPrinterDataFromPort

Pointer to the print monitor's GetPrinterDataFromPort function.

pfnSetPortTimeOuts

Pointer to the print monitor's SetPortTimeOuts function. (Port monitors only.)

pfnXcvOpenPort

Pointer to the print monitor's XcvOpenPort function. (Port monitors only.)

pfnXcvDataPort

Pointer to the print monitor's XcvDataPort function. (Port monitors only.)

pfnXcvClosePort

Pointer to the print monitor's XcvClosePort function. (Port monitors only.)

pfnShutdown

Pointer to the print monitor's Shutdown function.

pfnSendRecvBidiDataFromPort

Pointer to the print monitor's SendRecvBidiDataFromPort function.

Remarks

Each language monitor and each port monitor server DLL must provide a MONITOR2 structure. The monitor must supply values for all structure members, and specify the structure's address as the return value for its InitializePrintMonitor2 function.

If a function is not defined, its pointer must be NULL.

Requirements

Header

Winsplp.h (include Winsplp.h)

See also

InitializePrintMonitor2
MONITORUI

 

 

Send comments about this topic to Microsoft

Show:
© 2016 Microsoft