LPC message types changed from macros to a enum type (LPC_TYPE).
authorEmanuele Aliberti <ea@iol.it>
Sat, 26 Jan 2002 11:19:18 +0000 (11:19 +0000)
committerEmanuele Aliberti <ea@iol.it>
Sat, 26 Jan 2002 11:19:18 +0000 (11:19 +0000)
svn path=/trunk/; revision=2558

reactos/include/napi/lpc.h

index 9c3e244..c26cda5 100644 (file)
@@ -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,