Add PORT_MESSAGE_TYPE macro.
[reactos.git] / reactos / include / ndk / lpctypes.h
1 /*
2 * PROJECT: ReactOS Native Headers
3 * FILE: include/ndk/lpctypes.h
4 * PURPOSE: Definitions for Local Procedure Call Types not defined in DDK/IFS
5 * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
6 * UPDATE HISTORY:
7 * Created 06/10/04
8 */
9 #ifndef _LPCTYPES_H
10 #define _LPCTYPES_H
11
12 #define PORT_MESSAGE_TYPE(m) ((m).Header.MessageType)
13
14 /* DEPENDENCIES **************************************************************/
15
16 /* EXPORTED DATA *************************************************************/
17
18 /* CONSTANTS *****************************************************************/
19 #define LPC_MESSAGE_BASE_SIZE 24
20 #define MAX_MESSAGE_DATA (0x130)
21 #define PORT_MAX_DATA_LENGTH 0x104
22 #define PORT_MAX_MESSAGE_LENGTH 0x148
23
24 /* ENUMERATIONS **************************************************************/
25
26 typedef enum _LPC_TYPE
27 {
28 LPC_NEW_MESSAGE,
29 LPC_REQUEST,
30 LPC_REPLY,
31 LPC_DATAGRAM,
32 LPC_LOST_REPLY,
33 LPC_PORT_CLOSED,
34 LPC_CLIENT_DIED,
35 LPC_EXCEPTION,
36 LPC_DEBUG_EVENT,
37 LPC_ERROR_EVENT,
38 LPC_CONNECTION_REQUEST,
39 LPC_CONNECTION_REFUSED,
40 LPC_MAXIMUM
41 } LPC_TYPE;
42
43 /* TYPES *********************************************************************/
44
45 /* FIXME: USE REAL DEFINITION */
46 typedef struct _LPC_MESSAGE
47 {
48 USHORT DataSize;
49 USHORT MessageSize;
50 USHORT MessageType;
51 USHORT VirtualRangesOffset;
52 CLIENT_ID ClientId;
53 ULONG MessageId;
54 ULONG SectionSize;
55 } LPC_MESSAGE, *PLPC_MESSAGE;
56
57 /* FIXME: USE REAL DEFINITION */
58 typedef struct _LPC_SECTION_WRITE
59 {
60 ULONG Length;
61 HANDLE SectionHandle;
62 ULONG SectionOffset;
63 ULONG ViewSize;
64 PVOID ViewBase;
65 PVOID TargetViewBase;
66 } LPC_SECTION_WRITE, *PLPC_SECTION_WRITE;
67
68 /* FIXME: USE REAL DEFINITION */
69 typedef struct _LPC_SECTION_READ
70 {
71 ULONG Length;
72 ULONG ViewSize;
73 PVOID ViewBase;
74 } LPC_SECTION_READ, *PLPC_SECTION_READ;
75
76 /* FIXME: USE REAL DEFINITION */
77 typedef struct _LPC_MAX_MESSAGE
78 {
79 LPC_MESSAGE Header;
80 BYTE Data[MAX_MESSAGE_DATA];
81 } LPC_MAX_MESSAGE, *PLPC_MAX_MESSAGE;
82
83 #endif