From 35fb40b8b7403b4f934e6c2e402ccdddacf5a696 Mon Sep 17 00:00:00 2001 From: Emanuele Aliberti Date: Sat, 26 Jan 2002 11:19:18 +0000 Subject: [PATCH] LPC message types changed from macros to a enum type (LPC_TYPE). svn path=/trunk/; revision=2558 --- reactos/include/napi/lpc.h | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/reactos/include/napi/lpc.h b/reactos/include/napi/lpc.h index 9c3e244c1a6..c26cda51cfb 100644 --- a/reactos/include/napi/lpc.h +++ b/reactos/include/napi/lpc.h @@ -5,18 +5,23 @@ #define MAX_MESSAGE_DATA (0x130) -#define UNUSED_MSG_TYPE (0x0) -#define LPC_REQUEST (0x1) -#define LPC_REPLY (0x2) -#define LPC_DATAGRAM (0x3) -#define LPC_LOST_REPLY (0x4) -#define LPC_PORT_CLOSED (0x5) -#define LPC_CLIENT_DIED (0x6) -#define LPC_EXCEPTION (0x7) -#define LPC_DEBUG_EVENT (0x8) -#define LPC_ERROR_EVENT (0x9) -#define LPC_CONNECTION_REQUEST (0xa) -#define LPC_CONNECTION_REFUSED (0xb) +typedef enum +{ + UNUSED_MSG_TYPE = 0x0, /* ReactOS */ + LPC_NEW_MESSAGE = 0x0, /* NT */ + LPC_REQUEST = 0x1, + LPC_REPLY = 0x2, + LPC_DATAGRAM = 0x3, + LPC_LOST_REPLY = 0x4, + LPC_PORT_CLOSED = 0x5, + LPC_CLIENT_DIED = 0x6, + LPC_EXCEPTION = 0x7, + LPC_DEBUG_EVENT = 0x8, + LPC_ERROR_EVENT = 0x9, + LPC_CONNECTION_REQUEST = 0xa, + LPC_CONNECTION_REFUSED = 0xb + +} LPC_TYPE, *PLPC_TYPE; typedef struct _LPC_SECTION_WRITE { @@ -39,7 +44,7 @@ typedef struct _LPC_MESSAGE_HEADER { USHORT DataSize; USHORT MessageSize; - USHORT MessageType; + LPC_TYPE MessageType; USHORT VirtualRangesOffset; CLIENT_ID Cid; ULONG MessageId; @@ -105,7 +110,7 @@ typedef struct _LPC_MAX_MESSAGE BYTE Data[MAX_MESSAGE_DATA]; } LPC_MAX_MESSAGE, *PLPC_MAX_MESSAGE; -#define PORT_MESSAGE_TYPE(m) (USHORT)((m).Header.MessageType) +#define PORT_MESSAGE_TYPE(m) (LPC_TYPE)((m).Header.MessageType) NTSTATUS STDCALL NtAcceptConnectPort (PHANDLE PortHandle, HANDLE NamedPortHandle,