ReactOS  0.4.15-dev-4570-g4f8bbd1
precomp.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Local Port Monitor
3  * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * PURPOSE: Precompiled Header for all source files
5  * COPYRIGHT: Copyright 2015 Colin Finck (colin@reactos.org)
6  */
7 
8 #ifndef _PRECOMP_H
9 #define _PRECOMP_H
10 
11 #define WIN32_NO_STATUS
12 #include <stdlib.h>
13 
14 #include <windef.h>
15 #include <winbase.h>
16 #include <wingdi.h>
17 #include <winreg.h>
18 #include <winspool.h>
19 #include <winsplp.h>
20 #include <winuser.h>
21 #include <ndk/rtlfuncs.h>
22 
23 #include <spoolss.h>
24 
25 #include <wine/debug.h>
27 
28 #include "resource.h"
29 
30 #define SIGLCMMON 'FrCN'
31 #define SIGLCMPORT 'FrHK'
32 
33 // Structures
38 typedef struct _LOCALMON_HANDLE
39 {
45 }
47 
52 typedef struct _LOCALMON_PORT
53 {
58  enum {
63  }
64  PortType;
70 }
72 
77 typedef struct _LOCALMON_XCV
78 {
83 }
85 
86 // main.c
87 extern DWORD cbLocalMonitor;
88 extern DWORD cbLocalPort;
90 extern PCWSTR pwszLocalPort;
91 void WINAPI LocalmonShutdown(HANDLE hMonitor);
92 
93 // ports.c
96 BOOL WINAPI LocalmonEnumPorts(HANDLE hMonitor, PWSTR pName, DWORD Level, PBYTE pPorts, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned);
97 BOOL WINAPI LocalmonGetPrinterDataFromPort(HANDLE hPort, DWORD ControlID, PWSTR pValueName, PWSTR lpInBuffer, DWORD cbInBuffer, PWSTR lpOutBuffer, DWORD cbOutBuffer, PDWORD lpcbReturned);
99 BOOL WINAPI LocalmonReadPort(HANDLE hPort, PBYTE pBuffer, DWORD cbBuffer, PDWORD pcbRead);
101 BOOL WINAPI LocalmonStartDocPort(HANDLE hPort, PWSTR pPrinterName, DWORD JobId, DWORD Level, PBYTE pDocInfo);
102 BOOL WINAPI LocalmonWritePort(HANDLE hPort, PBYTE pBuffer, DWORD cbBuf, PDWORD pcbWritten);
103 BOOL WINAPI LocalmonAddPort( HANDLE hMonitor, LPWSTR pName, HWND hWnd, LPWSTR pMonitorName );
106 BOOL WINAPI LocalmonDeletePort( HANDLE hMonitor, LPWSTR pName, HWND hWnd, LPWSTR pPortName );
107 
108 // tools.c
109 BOOL DoesPortExist(PCWSTR pwszPortName);
111 DWORD GetPortNameWithoutColon(PCWSTR pwszPortName, PWSTR* ppwszPortNameWithoutColon);
113 
114 // xcv.c
116 DWORD WINAPI LocalmonXcvDataPort(HANDLE hXcv, PCWSTR pszDataName, PBYTE pInputData, DWORD cbInputData, PBYTE pOutputData, DWORD cbOutputData, PDWORD pcbOutputNeeded);
118 
119 #endif
BOOL WINAPI LocalmonStartDocPort(HANDLE hPort, PWSTR pPrinterName, DWORD JobId, DWORD Level, PBYTE pDocInfo)
Definition: ports.c:896
BOOL WINAPI LocalmonXcvOpenPort(HANDLE hMonitor, PCWSTR pszObject, ACCESS_MASK GrantedAccess, PHANDLE phXcv)
Definition: xcv.c:566
BOOL WINAPI LocalmonGetPrinterDataFromPort(HANDLE hPort, DWORD ControlID, PWSTR pValueName, PWSTR lpInBuffer, DWORD cbInBuffer, PWSTR lpOutBuffer, DWORD cbOutBuffer, PDWORD lpcbReturned)
Definition: ports.c:630
const uint16_t * PCWSTR
Definition: typedefs.h:57
PCWSTR pwszLocalPort
Definition: main.c:14
void WINAPI LocalmonShutdown(HANDLE hMonitor)
Definition: main.c:112
LIST_ENTRY Entry
Definition: precomp.h:54
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
struct _LOCALMON_XCV LOCALMON_XCV
uint16_t * PWSTR
Definition: typedefs.h:56
HWND hWnd
Definition: settings.c:17
LIST_ENTRY XcvHandles
Definition: precomp.h:44
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:55
struct _LOCALMON_XCV * PLOCALMON_XCV
DWORD Sig
Definition: precomp.h:57
BOOL WINAPI LocalmonWritePort(HANDLE hPort, PBYTE pBuffer, DWORD cbBuf, PDWORD pcbWritten)
Definition: ports.c:996
DWORD GetLPTTransmissionRetryTimeout(VOID)
Definition: tools.c:85
LIST_ENTRY Entry
Definition: precomp.h:79
struct _LOCALMON_PORT LOCALMON_PORT
unsigned char * LPBYTE
Definition: typedefs.h:53
unsigned int BOOL
Definition: ntddk_ex.h:94
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:175
PVOID pBuffer
BOOL bStartedDoc
Definition: precomp.h:65
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
WINE_DEFAULT_DEBUG_CHANNEL(cmd)
BOOL WINAPI LocalmonEnumPorts(HANDLE hMonitor, PWSTR pName, DWORD Level, PBYTE pPorts, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
Definition: ports.c:530
LIST_ENTRY FilePorts
Definition: precomp.h:42
BOOL DoesPortExist(PCWSTR pwszPortName)
Definition: tools.c:24
DWORD GetTypeFromName(LPCWSTR name)
Definition: tools.c:215
LIST_ENTRY RegistryPorts
Definition: precomp.h:43
static LPSTR pName
Definition: security.c:75
BOOL WINAPI LocalmonConfigurePort(HANDLE hMonitor, LPWSTR pName, HWND hWnd, LPWSTR pPortName)
Definition: ports.c:1189
PWSTR pwszPortName
Definition: precomp.h:55
PCWSTR pwszLocalMonitor
Definition: main.c:13
BOOL WINAPI LocalmonClosePort(HANDLE hPort)
Definition: ports.c:456
PLOCALMON_HANDLE pLocalmon
Definition: precomp.h:56
struct _LOCALMON_HANDLE LOCALMON_HANDLE
#define WINAPI
Definition: msvc.h:6
PWSTR pwszMapping
Definition: precomp.h:69
unsigned long DWORD
Definition: ntddk_ex.h:95
CRITICAL_SECTION Section
Definition: precomp.h:40
BOOL WINAPI LocalmonAddPortEx(HANDLE hMonitor, LPWSTR pName, DWORD Level, LPBYTE lpBuffer, LPWSTR lpMonitorName)
Definition: ports.c:1054
DWORD cbLocalPort
Definition: main.c:12
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:454
Definition: typedefs.h:119
DWORD dwJobID
Definition: precomp.h:66
HANDLE hFile
Definition: precomp.h:67
BOOL WINAPI LocalmonOpenPort(HANDLE hMonitor, PWSTR pName, PHANDLE pHandle)
Definition: ports.c:684
BOOL WINAPI LocalmonEndDocPort(HANDLE hPort)
Definition: ports.c:493
BOOL WINAPI LocalmonDeletePort(HANDLE hMonitor, LPWSTR pName, HWND hWnd, LPWSTR pPortName)
Definition: ports.c:1197
PWSTR pwszObject
Definition: precomp.h:82
PLOCALMON_HANDLE pLocalmon
Definition: precomp.h:81
_In_ DWORD _Out_ PDWORD pcbNeeded
Definition: winddi.h:3827
BOOL WINAPI LocalmonAddPort(HANDLE hMonitor, LPWSTR pName, HWND hWnd, LPWSTR pMonitorName)
Definition: ports.c:1137
BOOL WINAPI LocalmonReadPort(HANDLE hPort, PBYTE pBuffer, DWORD cbBuffer, PDWORD pcbRead)
Definition: ports.c:843
HANDLE hPrinter
Definition: precomp.h:68
DWORD * PDWORD
Definition: pedump.c:68
BOOL WINAPI LocalmonXcvClosePort(HANDLE hXcv)
Definition: xcv.c:502
Definition: name.c:38
BOOL WINAPI LocalmonSetPortTimeOuts(HANDLE hPort, LPCOMMTIMEOUTS lpCTO, DWORD Reserved)
Definition: ports.c:789
static HANDLE hXcv
Definition: localmon.c:73
WCHAR * LPWSTR
Definition: xmlstorage.h:184
_In_ PSECURITY_SUBJECT_CONTEXT _In_ BOOLEAN _In_ ACCESS_MASK _In_ ACCESS_MASK _Outptr_opt_ PPRIVILEGE_SET _In_ PGENERIC_MAPPING _In_ KPROCESSOR_MODE _Out_ PACCESS_MASK GrantedAccess
Definition: sefuncs.h:13
enum _LOCALMON_PORT::@4888 PortType
BYTE * PBYTE
Definition: pedump.c:66
ULONG ACCESS_MASK
Definition: nt_native.h:40
DWORD cbLocalMonitor
Definition: main.c:11
struct _LOCALMON_HANDLE * PLOCALMON_HANDLE
DWORD GetPortNameWithoutColon(PCWSTR pwszPortName, PWSTR *ppwszPortNameWithoutColon)
Definition: tools.c:142
struct _LOCALMON_PORT * PLOCALMON_PORT
DWORD WINAPI LocalmonXcvDataPort(HANDLE hXcv, PCWSTR pszDataName, PBYTE pInputData, DWORD cbInputData, PBYTE pOutputData, DWORD cbOutputData, PDWORD pcbOutputNeeded)
Definition: xcv.c:526
ACCESS_MASK GrantedAccess
Definition: precomp.h:80