ReactOS 0.4.15-dev-8131-g4988de4
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
38typedef struct _LOCALMON_HANDLE
39{
45}
47
52typedef struct _LOCALMON_PORT
53{
58 enum {
63 }
70}
72
77typedef struct _LOCALMON_XCV
78{
83}
85
86// main.c
88extern DWORD cbLocalPort;
91void WINAPI LocalmonShutdown(HANDLE hMonitor);
92
93// ports.c
96BOOL WINAPI LocalmonEnumPorts(HANDLE hMonitor, PWSTR pName, DWORD Level, PBYTE pPorts, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned);
97BOOL WINAPI LocalmonGetPrinterDataFromPort(HANDLE hPort, DWORD ControlID, PWSTR pValueName, PWSTR lpInBuffer, DWORD cbInBuffer, PWSTR lpOutBuffer, DWORD cbOutBuffer, PDWORD lpcbReturned);
99BOOL WINAPI LocalmonReadPort(HANDLE hPort, PBYTE pBuffer, DWORD cbBuffer, PDWORD pcbRead);
101BOOL WINAPI LocalmonStartDocPort(HANDLE hPort, PWSTR pPrinterName, DWORD JobId, DWORD Level, PBYTE pDocInfo);
102BOOL WINAPI LocalmonWritePort(HANDLE hPort, PBYTE pBuffer, DWORD cbBuf, PDWORD pcbWritten);
103BOOL WINAPI LocalmonAddPort( HANDLE hMonitor, LPWSTR pName, HWND hWnd, LPWSTR pMonitorName );
107
108// tools.c
109BOOL DoesPortExist(PCWSTR pwszPortName);
111DWORD GetPortNameWithoutColon(PCWSTR pwszPortName, PWSTR* ppwszPortNameWithoutColon);
113
114// xcv.c
116DWORD WINAPI LocalmonXcvDataPort(HANDLE hXcv, PCWSTR pszDataName, PBYTE pInputData, DWORD cbInputData, PBYTE pOutputData, DWORD cbOutputData, PDWORD pcbOutputNeeded);
118
119#endif
HWND hWnd
Definition: settings.c:17
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:175
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
static HANDLE hXcv
Definition: localmon.c:73
static LPSTR pName
Definition: security.c:75
ULONG ACCESS_MASK
Definition: nt_native.h:40
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
BYTE * PBYTE
Definition: pedump.c:66
DWORD * PDWORD
Definition: pedump.c:68
PVOID pBuffer
Definition: typedefs.h:120
LIST_ENTRY XcvHandles
Definition: precomp.h:44
CRITICAL_SECTION Section
Definition: precomp.h:40
LIST_ENTRY FilePorts
Definition: precomp.h:42
LIST_ENTRY RegistryPorts
Definition: precomp.h:43
PWSTR pwszPortName
Definition: precomp.h:55
@ PortType_Other
Definition: precomp.h:59
@ PortType_PhysicalCOM
Definition: precomp.h:61
@ PortType_PhysicalLPT
Definition: precomp.h:62
DWORD Sig
Definition: precomp.h:57
PLOCALMON_HANDLE pLocalmon
Definition: precomp.h:56
PWSTR pwszMapping
Definition: precomp.h:69
LIST_ENTRY Entry
Definition: precomp.h:54
DWORD dwJobID
Definition: precomp.h:66
BOOL bStartedDoc
Definition: precomp.h:65
enum _LOCALMON_PORT::@5127 PortType
HANDLE hPrinter
Definition: precomp.h:68
HANDLE hFile
Definition: precomp.h:67
PLOCALMON_HANDLE pLocalmon
Definition: precomp.h:81
PWSTR pwszObject
Definition: precomp.h:82
LIST_ENTRY Entry
Definition: precomp.h:79
ACCESS_MASK GrantedAccess
Definition: precomp.h:80
Definition: name.c:39
uint16_t * PWSTR
Definition: typedefs.h:56
const uint16_t * PCWSTR
Definition: typedefs.h:57
unsigned char * LPBYTE
Definition: typedefs.h:53
BOOL WINAPI LocalmonStartDocPort(HANDLE hPort, PWSTR pPrinterName, DWORD JobId, DWORD Level, PBYTE pDocInfo)
Definition: ports.c:896
DWORD GetTypeFromName(LPCWSTR name)
Definition: tools.c:215
struct _LOCALMON_XCV LOCALMON_XCV
void WINAPI LocalmonShutdown(HANDLE hMonitor)
Definition: main.c:112
BOOL WINAPI LocalmonDeletePort(HANDLE hMonitor, LPWSTR pName, HWND hWnd, LPWSTR pPortName)
Definition: ports.c:1197
BOOL WINAPI LocalmonXcvClosePort(HANDLE hXcv)
Definition: xcv.c:502
PCWSTR pwszLocalMonitor
Definition: main.c:13
BOOL WINAPI LocalmonAddPortEx(HANDLE hMonitor, LPWSTR pName, DWORD Level, LPBYTE lpBuffer, LPWSTR lpMonitorName)
Definition: ports.c:1054
struct _LOCALMON_PORT LOCALMON_PORT
BOOL WINAPI LocalmonOpenPort(HANDLE hMonitor, PWSTR pName, PHANDLE pHandle)
Definition: ports.c:684
BOOL WINAPI LocalmonAddPort(HANDLE hMonitor, LPWSTR pName, HWND hWnd, LPWSTR pMonitorName)
Definition: ports.c:1137
struct _LOCALMON_PORT * PLOCALMON_PORT
BOOL WINAPI LocalmonWritePort(HANDLE hPort, PBYTE pBuffer, DWORD cbBuf, PDWORD pcbWritten)
Definition: ports.c:996
DWORD cbLocalMonitor
Definition: main.c:11
BOOL WINAPI LocalmonEnumPorts(HANDLE hMonitor, PWSTR pName, DWORD Level, PBYTE pPorts, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
Definition: ports.c:530
BOOL WINAPI LocalmonReadPort(HANDLE hPort, PBYTE pBuffer, DWORD cbBuffer, PDWORD pcbRead)
Definition: ports.c:843
BOOL WINAPI LocalmonXcvOpenPort(HANDLE hMonitor, PCWSTR pszObject, ACCESS_MASK GrantedAccess, PHANDLE phXcv)
Definition: xcv.c:566
DWORD cbLocalPort
Definition: main.c:12
DWORD GetPortNameWithoutColon(PCWSTR pwszPortName, PWSTR *ppwszPortNameWithoutColon)
Definition: tools.c:142
DWORD WINAPI LocalmonXcvDataPort(HANDLE hXcv, PCWSTR pszDataName, PBYTE pInputData, DWORD cbInputData, PBYTE pOutputData, DWORD cbOutputData, PDWORD pcbOutputNeeded)
Definition: xcv.c:526
BOOL WINAPI LocalmonGetPrinterDataFromPort(HANDLE hPort, DWORD ControlID, PWSTR pValueName, PWSTR lpInBuffer, DWORD cbInBuffer, PWSTR lpOutBuffer, DWORD cbOutBuffer, PDWORD lpcbReturned)
Definition: ports.c:630
struct _LOCALMON_HANDLE * PLOCALMON_HANDLE
PCWSTR pwszLocalPort
Definition: main.c:14
struct _LOCALMON_XCV * PLOCALMON_XCV
BOOL WINAPI LocalmonEndDocPort(HANDLE hPort)
Definition: ports.c:493
struct _LOCALMON_HANDLE LOCALMON_HANDLE
DWORD GetLPTTransmissionRetryTimeout(VOID)
Definition: tools.c:85
BOOL WINAPI LocalmonConfigurePort(HANDLE hMonitor, LPWSTR pName, HWND hWnd, LPWSTR pPortName)
Definition: ports.c:1189
BOOL WINAPI LocalmonClosePort(HANDLE hPort)
Definition: ports.c:456
BOOL WINAPI LocalmonSetPortTimeOuts(HANDLE hPort, LPCOMMTIMEOUTS lpCTO, DWORD Reserved)
Definition: ports.c:789
BOOL DoesPortExist(PCWSTR pwszPortName)
Definition: tools.c:24
_In_ DWORD _Out_ PDWORD pcbNeeded
Definition: winddi.h:3828
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
#define WINAPI
Definition: msvc.h:6
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:56
_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:20
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185