ntoskrnl header cleanups
authorAlex Ionescu <aionescu@gmail.com>
Tue, 13 Sep 2005 23:48:54 +0000 (23:48 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Tue, 13 Sep 2005 23:48:54 +0000 (23:48 +0000)
svn path=/trunk/; revision=17845

reactos/include/ndk/pstypes.h
reactos/ntoskrnl/include/internal/ob.h
reactos/ntoskrnl/include/internal/po.h
reactos/ntoskrnl/include/internal/port.h
reactos/ntoskrnl/lpc/port.c
reactos/ntoskrnl/ob/handle.c
reactos/ntoskrnl/ob/namespc.c
reactos/ntoskrnl/ob/object.c
reactos/ntoskrnl/ob/sdcache.c
reactos/ntoskrnl/ob/symlink.c
reactos/ntoskrnl/po/power.c

index 1568409..9c170f6 100644 (file)
@@ -499,6 +499,12 @@ typedef struct _PS_IMPERSONATION_INFORMATION
     SECURITY_IMPERSONATION_LEVEL    ImpersonationLevel;
 } PS_IMPERSONATION_INFORMATION, *PPS_IMPERSONATION_INFORMATION;
 
+typedef struct _TERMINATION_PORT
+{
+    struct _TERMINATION_PORT *Next;
+    PVOID Port;
+} TERMINATION_PORT, *PTERMINATION_PORT;
+
 #include <pshpack4.h>
 typedef struct _ETHREAD
 {
index 6545ee4..ae3c5a7 100644 (file)
 
 struct _EPROCESS;
 
+#define ICIF_QUERY               0x1
+#define ICIF_SET                 0x2
+#define ICIF_QUERY_SIZE_VARIABLE 0x4
+#define ICIF_SET_SIZE_VARIABLE   0x8
+#define ICIF_SIZE_VARIABLE (ICIF_QUERY_SIZE_VARIABLE | ICIF_SET_SIZE_VARIABLE)
+
 typedef struct _DIRECTORY_OBJECT
 {
-   CSHORT Type;
-   CSHORT Size;
+    CSHORT Type;
+    CSHORT Size;
 
    /*
     * PURPOSE: Head of the list of our subdirectories
     */
-   LIST_ENTRY head;
-   KSPIN_LOCK Lock;
+    LIST_ENTRY head;
+    KSPIN_LOCK Lock;
 } DIRECTORY_OBJECT, *PDIRECTORY_OBJECT;
 
 typedef struct _SYMLINK_OBJECT
 {
-  CSHORT Type;
-  CSHORT Size;
-  UNICODE_STRING TargetName;
-  LARGE_INTEGER CreateTime;
+    CSHORT Type;
+    CSHORT Size;
+    UNICODE_STRING TargetName;
+    LARGE_INTEGER CreateTime;
 } SYMLINK_OBJECT, *PSYMLINK_OBJECT;
 
-/*
- * Enumeration of object types
- */
-enum
+typedef struct _INFORMATION_CLASS_INFO
 {
-   OBJTYP_INVALID,
-   OBJTYP_TYPE,
-   OBJTYP_DIRECTORY,
-   OBJTYP_SYMLNK,
-   OBJTYP_DEVICE,
-   OBJTYP_THREAD,
-   OBJTYP_FILE,
-   OBJTYP_PROCESS,
-   OBJTYP_SECTION,
-   OBJTYP_MAX,
-};
+  ULONG RequiredSizeQUERY;
+  ULONG RequiredSizeSET;
+  ULONG AlignmentSET;
+  ULONG AlignmentQUERY;
+  ULONG Flags;
+} INFORMATION_CLASS_INFO, *PINFORMATION_CLASS_INFO;
 
 #define BODY_TO_HEADER(objbdy)                                                 \
   CONTAINING_RECORD((objbdy), OBJECT_HEADER, Body)
@@ -62,10 +60,6 @@ enum
 
 #define OBJECT_ALLOC_SIZE(ObjectSize) ((ObjectSize)+sizeof(OBJECT_HEADER))
 
-extern PDIRECTORY_OBJECT NameSpaceRoot;
-extern POBJECT_TYPE ObSymbolicLinkType;
-extern PHANDLE_TABLE ObpKernelHandleTable;
-
 #define KERNEL_HANDLE_FLAG (1 << ((sizeof(HANDLE) * 8) - 1))
 #define ObIsKernelHandle(Handle, ProcessorMode)                                \
   (((ULONG_PTR)(Handle) & KERNEL_HANDLE_FLAG) &&                               \
@@ -73,94 +67,152 @@ extern PHANDLE_TABLE ObpKernelHandleTable;
 #define ObKernelHandleToHandle(Handle)                                         \
   (HANDLE)((ULONG_PTR)(Handle) & ~KERNEL_HANDLE_FLAG)
 
-VOID ObpAddEntryDirectory(PDIRECTORY_OBJECT Parent,
-                         POBJECT_HEADER Header,
-                         PWSTR Name);
-VOID ObpRemoveEntryDirectory(POBJECT_HEADER Header);
+extern PDIRECTORY_OBJECT NameSpaceRoot;
+extern POBJECT_TYPE ObSymbolicLinkType;
+extern PHANDLE_TABLE ObpKernelHandleTable;
+
+VOID
+NTAPI
+ObpAddEntryDirectory(
+    PDIRECTORY_OBJECT Parent,
+    POBJECT_HEADER Header,
+    PWSTR Name
+);
+
+VOID
+NTAPI
+ObpRemoveEntryDirectory(POBJECT_HEADER Header);
 
 VOID
+NTAPI
 ObInitSymbolicLinkImplementation(VOID);
 
+NTSTATUS
+NTAPI
+ObpCreateHandle(
+    struct _EPROCESS* Process,
+    PVOID ObjectBody,
+    ACCESS_MASK GrantedAccess,
+    BOOLEAN Inherit,
+    PHANDLE Handle
+);
+
+VOID
+NTAPI
+ObCreateHandleTable(
+    struct _EPROCESS* Parent,
+    BOOLEAN Inherit,
+    struct _EPROCESS* Process
+);
 
-NTSTATUS ObpCreateHandle(struct _EPROCESS* Process,
-                       PVOID ObjectBody,
-                       ACCESS_MASK GrantedAccess,
-                       BOOLEAN Inherit,
-                       PHANDLE Handle);
-VOID ObCreateHandleTable(struct _EPROCESS* Parent,
-                        BOOLEAN Inherit,
-                        struct _EPROCESS* Process);
-NTSTATUS ObFindObject(POBJECT_CREATE_INFORMATION ObjectCreateInfo,
-            PUNICODE_STRING ObjectName,
-                     PVOID* ReturnedObject,
-                     PUNICODE_STRING RemainingPath,
-                     POBJECT_TYPE ObjectType);
+NTSTATUS
+NTAPI
+ObFindObject(
+    POBJECT_CREATE_INFORMATION ObjectCreateInfo,
+    PUNICODE_STRING ObjectName,
+    PVOID* ReturnedObject,
+    PUNICODE_STRING RemainingPath,
+    POBJECT_TYPE ObjectType
+);
 
 NTSTATUS
-ObpQueryHandleAttributes(HANDLE Handle,
-                        POBJECT_HANDLE_ATTRIBUTE_INFORMATION HandleInfo);
+NTAPI
+ObpQueryHandleAttributes(
+    HANDLE Handle,
+    POBJECT_HANDLE_ATTRIBUTE_INFORMATION HandleInfo
+);
 
 NTSTATUS
-ObpSetHandleAttributes(HANDLE Handle,
-                      POBJECT_HANDLE_ATTRIBUTE_INFORMATION HandleInfo);
+NTAPI
+ObpSetHandleAttributes(
+    HANDLE Handle,
+    POBJECT_HANDLE_ATTRIBUTE_INFORMATION HandleInfo
+);
 
 NTSTATUS
 STDCALL
-ObpCreateTypeObject(struct _OBJECT_TYPE_INITIALIZER *ObjectTypeInitializer, 
-                    PUNICODE_STRING TypeName, 
-                    POBJECT_TYPE *ObjectType);
+ObpCreateTypeObject(
+    struct _OBJECT_TYPE_INITIALIZER *ObjectTypeInitializer,
+    PUNICODE_STRING TypeName,
+    POBJECT_TYPE *ObjectType
+);
 
 ULONG
+NTAPI
 ObGetObjectHandleCount(PVOID Object);
+
 NTSTATUS
-ObDuplicateObject(PEPROCESS SourceProcess,
-                 PEPROCESS TargetProcess,
-                 HANDLE SourceHandle,
-                 PHANDLE TargetHandle,
-                 ACCESS_MASK DesiredAccess,
-                 BOOLEAN InheritHandle,
-                 ULONG Options);
+NTAPI
+ObDuplicateObject(
+    PEPROCESS SourceProcess,
+    PEPROCESS TargetProcess,
+    HANDLE SourceHandle,
+    PHANDLE TargetHandle,
+    ACCESS_MASK DesiredAccess,
+    BOOLEAN InheritHandle,
+    ULONG Options
+);
 
 ULONG
+NTAPI
 ObpGetHandleCountByHandleTable(PHANDLE_TABLE HandleTable);
 
 VOID
 STDCALL
-ObQueryDeviceMapInformation(PEPROCESS Process, PPROCESS_DEVICEMAP_INFORMATION DeviceMapInfo);
+ObQueryDeviceMapInformation(
+    PEPROCESS Process,
+    PPROCESS_DEVICEMAP_INFORMATION DeviceMapInfo
+);
 
-VOID FASTCALL
-ObpSetPermanentObject (IN PVOID ObjectBody, IN BOOLEAN Permanent);
+VOID
+FASTCALL
+ObpSetPermanentObject(
+    IN PVOID ObjectBody,
+    IN BOOLEAN Permanent
+);
 
 VOID
 STDCALL
 ObKillProcess(PEPROCESS Process);
+
 /* Security descriptor cache functions */
 
 NTSTATUS
+NTAPI
 ObpInitSdCache(VOID);
 
 NTSTATUS
-ObpAddSecurityDescriptor(IN PSECURITY_DESCRIPTOR SourceSD,
-                        OUT PSECURITY_DESCRIPTOR *DestinationSD);
+NTAPI
+ObpAddSecurityDescriptor(
+    IN PSECURITY_DESCRIPTOR SourceSD,
+    OUT PSECURITY_DESCRIPTOR *DestinationSD
+);
 
 NTSTATUS
+NTAPI
 ObpRemoveSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor);
 
 VOID
+NTAPI
 ObpReferenceCachedSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor);
 
 VOID
+NTAPI
 ObpDereferenceCachedSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor);
 
 VOID
 FASTCALL
-ObInitializeFastReference(IN PEX_FAST_REF FastRef,
-                          PVOID Object);
+ObInitializeFastReference(
+    IN PEX_FAST_REF FastRef,
+    PVOID Object
+);
 
 PVOID
 FASTCALL
-ObFastReplaceObject(IN PEX_FAST_REF FastRef,
-                    PVOID Object);
+ObFastReplaceObject(
+    IN PEX_FAST_REF FastRef,
+    PVOID Object
+);
 
 PVOID
 FASTCALL
@@ -168,32 +220,30 @@ ObFastReferenceObject(IN PEX_FAST_REF FastRef);
 
 VOID
 FASTCALL
-ObFastDereferenceObject(IN PEX_FAST_REF FastRef,
-                        PVOID Object);
+ObFastDereferenceObject(
+    IN PEX_FAST_REF FastRef,
+    PVOID Object
+);
 
 /* Secure object information functions */
 
-typedef struct _CAPTURED_OBJECT_ATTRIBUTES
-{
-  HANDLE RootDirectory;
-  ULONG Attributes;
-  PSECURITY_DESCRIPTOR SecurityDescriptor;
-  PSECURITY_QUALITY_OF_SERVICE SecurityQualityOfService;
-} CAPTURED_OBJECT_ATTRIBUTES, *PCAPTURED_OBJECT_ATTRIBUTES;
-
 NTSTATUS
 STDCALL
-ObpCaptureObjectName(IN PUNICODE_STRING CapturedName,
-                     IN PUNICODE_STRING ObjectName,
-                     IN KPROCESSOR_MODE AccessMode);
-                     
+ObpCaptureObjectName(
+    IN PUNICODE_STRING CapturedName,
+    IN PUNICODE_STRING ObjectName,
+    IN KPROCESSOR_MODE AccessMode
+);
+
 NTSTATUS
 STDCALL
-ObpCaptureObjectAttributes(IN POBJECT_ATTRIBUTES ObjectAttributes,
-                           IN KPROCESSOR_MODE AccessMode,
-                           IN POBJECT_TYPE ObjectType,
-                           IN POBJECT_CREATE_INFORMATION ObjectCreateInfo,
-                           OUT PUNICODE_STRING ObjectName);
+ObpCaptureObjectAttributes(
+    IN POBJECT_ATTRIBUTES ObjectAttributes,
+    IN KPROCESSOR_MODE AccessMode,
+    IN POBJECT_TYPE ObjectType,
+    IN POBJECT_CREATE_INFORMATION ObjectCreateInfo,
+    OUT PUNICODE_STRING ObjectName
+);
 
 VOID
 STDCALL
@@ -201,21 +251,6 @@ ObpReleaseCapturedAttributes(IN POBJECT_CREATE_INFORMATION ObjectCreateInfo);
 
 /* object information classes */
 
-#define ICIF_QUERY               0x1
-#define ICIF_SET                 0x2
-#define ICIF_QUERY_SIZE_VARIABLE 0x4
-#define ICIF_SET_SIZE_VARIABLE   0x8
-#define ICIF_SIZE_VARIABLE (ICIF_QUERY_SIZE_VARIABLE | ICIF_SET_SIZE_VARIABLE)
-
-typedef struct _INFORMATION_CLASS_INFO
-{
-  ULONG RequiredSizeQUERY;
-  ULONG RequiredSizeSET;
-  ULONG AlignmentSET;
-  ULONG AlignmentQUERY;
-  ULONG Flags;
-} INFORMATION_CLASS_INFO, *PINFORMATION_CLASS_INFO;
-
 #define ICI_SQ_SAME(Size, Alignment, Flags)                                    \
   { Size, Size, Alignment, Alignment, Flags }
 
index 6ecd371..cbd0937 100644 (file)
@@ -4,12 +4,14 @@
 extern PDEVICE_NODE PopSystemPowerDeviceNode;
 
 VOID
+NTAPI
 PoInit(
     PLOADER_PARAMETER_BLOCK LoaderBlock, 
     BOOLEAN ForceAcpiDisable
 );
 
 NTSTATUS
+NTAPI
 PopSetSystemPowerState(SYSTEM_POWER_STATE PowerState);
 
 #endif /* __NTOSKRNL_INCLUDE_INTERNAL_PO_H */
index 0bdce16..f6c0ad4 100644 (file)
 #ifndef __INCLUDE_INTERNAL_PORT_H
 #define __INCLUDE_INTERNAL_PORT_H
 
-typedef struct _EPORT_LISTENER
-{
-  HANDLE ListenerPid;
-  LIST_ENTRY ListenerListEntry;
-} EPORT_LISTENER, *PEPORT_LISTENER;
+/* EPORT.Type */
 
-typedef struct _EPORT
-{
-  KSPIN_LOCK   Lock;
-  KSEMAPHORE    Semaphore;
+#define EPORT_TYPE_SERVER_RQST_PORT   (0)
+#define EPORT_TYPE_SERVER_COMM_PORT   (1)
+#define EPORT_TYPE_CLIENT_COMM_PORT   (2)
 
-  USHORT       Type;
-  USHORT       State;
+/* EPORT.State */
 
-  struct _EPORT * RequestPort;
-  struct _EPORT        * OtherPort;
+#define EPORT_INACTIVE                (0)
+#define EPORT_WAIT_FOR_CONNECT        (1)
+#define EPORT_WAIT_FOR_ACCEPT         (2)
+#define EPORT_WAIT_FOR_COMPLETE_SRV   (3)
+#define EPORT_WAIT_FOR_COMPLETE_CLT   (4)
+#define EPORT_CONNECTED_CLIENT        (5)
+#define EPORT_CONNECTED_SERVER        (6)
+#define EPORT_DISCONNECTED            (7)
 
-  ULONG                QueueLength;
-  LIST_ENTRY   QueueListHead;
+extern POBJECT_TYPE LpcPortObjectType;
+extern ULONG        LpcpNextMessageId;
+extern FAST_MUTEX   LpcpLock;
 
-  ULONG                ConnectQueueLength;
-  LIST_ENTRY   ConnectQueueListHead;
+typedef struct _EPORT_LISTENER
+{
+    HANDLE ListenerPid;
+    LIST_ENTRY ListenerListEntry;
+} EPORT_LISTENER, *PEPORT_LISTENER;
 
-  ULONG                MaxDataLength;
-  ULONG                MaxConnectInfoLength;
-  ULONG                MaxPoolUsage; /* size of NP zone */
-} EPORT, * PEPORT;
+typedef struct _EPORT
+{
+    KSPIN_LOCK Lock;
+    KSEMAPHORE Semaphore;
+    USHORT Type;
+    USHORT State;
+    struct _EPORT *RequestPort;
+    struct _EPORT *OtherPort;
+    ULONG QueueLength;
+    LIST_ENTRY QueueListHead;
+    ULONG ConnectQueueLength;
+    LIST_ENTRY ConnectQueueListHead;
+    ULONG MaxDataLength;
+    ULONG MaxConnectInfoLength;
+    ULONG MaxPoolUsage; /* size of NP zone */
+} EPORT, *PEPORT;
 
 typedef struct _EPORT_CONNECT_REQUEST_MESSAGE
 {
-  PORT_MESSAGE MessageHeader;
-  PEPROCESS ConnectingProcess;
-  struct _SECTION_OBJECT* SendSectionObject;
-  LARGE_INTEGER SendSectionOffset;
-  ULONG SendViewSize;
-  ULONG ConnectDataLength;
-  UCHAR ConnectData[0];
+    PORT_MESSAGE MessageHeader;
+    PEPROCESS ConnectingProcess;
+    struct _SECTION_OBJECT* SendSectionObject;
+    LARGE_INTEGER SendSectionOffset;
+    ULONG SendViewSize;
+    ULONG ConnectDataLength;
+    UCHAR ConnectData[0];
 } EPORT_CONNECT_REQUEST_MESSAGE, *PEPORT_CONNECT_REQUEST_MESSAGE;
 
 typedef struct _EPORT_CONNECT_REPLY_MESSAGE
 {
-  PORT_MESSAGE MessageHeader;
-  PVOID SendServerViewBase;
-  ULONG ReceiveClientViewSize;
-  PVOID ReceiveClientViewBase;
-  ULONG MaximumMessageSize;
-  ULONG ConnectDataLength;
-  UCHAR ConnectData[0];
+    PORT_MESSAGE MessageHeader;
+    PVOID SendServerViewBase;
+    ULONG ReceiveClientViewSize;
+    PVOID ReceiveClientViewBase;
+    ULONG MaximumMessageSize;
+    ULONG ConnectDataLength;
+    UCHAR ConnectData[0];
 } EPORT_CONNECT_REPLY_MESSAGE, *PEPORT_CONNECT_REPLY_MESSAGE;
 
-typedef struct _TERMINATION_PORT {
-    struct _TERMINATION_PORT *Next;
-    PVOID Port;
-} TERMINATION_PORT, *PTERMINATION_PORT;
+typedef struct _QUEUEDMESSAGE
+{
+    PEPORT Sender;
+    LIST_ENTRY QueueListEntry;
+    PORT_MESSAGE Message;
+} QUEUEDMESSAGE, *PQUEUEDMESSAGE;
 
-NTSTATUS STDCALL
-LpcRequestPort (PEPORT         Port,
-               PPORT_MESSAGE   LpcMessage);
 NTSTATUS
 STDCALL
-LpcSendTerminationPort (PEPORT Port,
-                       LARGE_INTEGER   CreationTime);
-
-/* EPORT.Type */
+LpcRequestPort(
+    PEPORT Port,
+    PPORT_MESSAGE LpcMessage
+);
 
-#define EPORT_TYPE_SERVER_RQST_PORT   (0)
-#define EPORT_TYPE_SERVER_COMM_PORT   (1)
-#define EPORT_TYPE_CLIENT_COMM_PORT   (2)
+NTSTATUS
+STDCALL
+LpcSendTerminationPort(
+    PEPORT Port,
+    LARGE_INTEGER CreationTime
+);
 
-/* EPORT.State */
+/* Code in ntoskrnl/lpc/close.h */
 
-#define EPORT_INACTIVE                (0)
-#define EPORT_WAIT_FOR_CONNECT        (1)
-#define EPORT_WAIT_FOR_ACCEPT         (2)
-#define EPORT_WAIT_FOR_COMPLETE_SRV   (3)
-#define EPORT_WAIT_FOR_COMPLETE_CLT   (4)
-#define EPORT_CONNECTED_CLIENT        (5)
-#define EPORT_CONNECTED_SERVER        (6)
-#define EPORT_DISCONNECTED            (7)
+VOID 
+STDCALL
+LpcpClosePort(
+    PVOID ObjectBody,
+    ULONG HandleCount
+);
 
-/* Pool Tags */
+VOID
+STDCALL
+LpcpDeletePort(IN PVOID ObjectBody);
 
-typedef struct _QUEUEDMESSAGE
-{
-  PEPORT               Sender;
-  LIST_ENTRY   QueueListEntry;
-  PORT_MESSAGE Message;
-} QUEUEDMESSAGE,  *PQUEUEDMESSAGE;
+/* Code in ntoskrnl/lpc/queue.c */
 
-/* Code in ntoskrnl/lpc/close.h */
+VOID
+STDCALL
+EiEnqueueConnectMessagePort(
+    IN OUT PEPORT Port,
+    IN PQUEUEDMESSAGE Message
+);
 
-VOID STDCALL
-LpcpClosePort (PVOID   ObjectBody,
-            ULONG      HandleCount);
-VOID STDCALL
-LpcpDeletePort (IN     PVOID   ObjectBody);
+VOID
+STDCALL
+EiEnqueueMessagePort(
+    IN OUT PEPORT Port,
+    IN PQUEUEDMESSAGE Message
+);
 
-/* Code in ntoskrnl/lpc/queue.c */
+VOID
+STDCALL
+EiEnqueueMessageAtHeadPort(
+    IN OUT PEPORT Port,
+    IN PQUEUEDMESSAGE Message
+);
 
-VOID STDCALL
-EiEnqueueConnectMessagePort (IN OUT    PEPORT          Port,
-                            IN PQUEUEDMESSAGE  Message);
-VOID STDCALL
-EiEnqueueMessagePort (IN OUT   PEPORT          Port,
-                     IN        PQUEUEDMESSAGE  Message);
-VOID STDCALL
-EiEnqueueMessageAtHeadPort (IN OUT     PEPORT          Port,
-                           IN  PQUEUEDMESSAGE  Message);
 PQUEUEDMESSAGE
 STDCALL
-EiDequeueConnectMessagePort (IN OUT    PEPORT  Port);
-PQUEUEDMESSAGE STDCALL
-EiDequeueMessagePort (IN OUT   PEPORT  Port);
-
-/* Code in ntoskrnl/lpc/create.c */
+EiDequeueConnectMessagePort(IN OUT PEPORT Port);
 
-NTSTATUS STDCALL
-NiCreatePort (PVOID                    ObjectBody,
-             PVOID                     Parent,
-             PWSTR                     RemainingPath,
-             POBJECT_ATTRIBUTES        ObjectAttributes);
+PQUEUEDMESSAGE
+STDCALL
+EiDequeueMessagePort(IN OUT PEPORT Port);
 
 /* Code in ntoskrnl/lpc/port.c */
 
-NTSTATUS STDCALL
-LpcpInitializePort (IN OUT  PEPORT     Port,
-                 IN      USHORT        Type,
-                 IN      PEPORT        Parent OPTIONAL);
 NTSTATUS
-LpcpInitSystem (VOID);
+STDCALL
+LpcpInitializePort(
+    IN OUT PEPORT Port,
+    IN USHORT Type,
+    IN PEPORT Parent OPTIONAL
+);
 
-extern POBJECT_TYPE    LpcPortObjectType;
-extern ULONG           LpcpNextMessageId;
-extern FAST_MUTEX      LpcpLock;
+NTSTATUS
+NTAPI
+LpcpInitSystem (VOID);
 
 /* Code in ntoskrnl/lpc/reply.c */
 
-NTSTATUS STDCALL
-EiReplyOrRequestPort (IN       PEPORT          Port,
-                     IN        PPORT_MESSAGE   LpcReply,
-                     IN        ULONG           MessageType,
-                     IN        PEPORT          Sender);
-
+NTSTATUS
+STDCALL
+EiReplyOrRequestPort(
+    IN PEPORT Port,
+    IN PPORT_MESSAGE LpcReply,
+    IN ULONG MessageType,
+    IN PEPORT Sender
+);
 
 #endif /* __INCLUDE_INTERNAL_PORT_H */
index 6f361e2..7a0a435 100644 (file)
@@ -32,7 +32,9 @@ static GENERIC_MAPPING LpcpPortMapping =
 /* FUNCTIONS *****************************************************************/
 
 
-NTSTATUS INIT_FUNCTION
+NTSTATUS
+INIT_FUNCTION
+NTAPI
 LpcpInitSystem (VOID)
 {
     OBJECT_TYPE_INITIALIZER ObjectTypeInitializer;
index bb09d36..6176766 100644 (file)
@@ -85,6 +85,7 @@ ObpDecrementHandleCount(PVOID ObjectBody)
 
 
 NTSTATUS
+NTAPI
 ObpQueryHandleAttributes(HANDLE Handle,
                         POBJECT_HANDLE_ATTRIBUTE_INFORMATION HandleInfo)
 {
@@ -128,6 +129,7 @@ ObpQueryHandleAttributes(HANDLE Handle,
 
 
 NTSTATUS
+NTAPI
 ObpSetHandleAttributes(HANDLE Handle,
                       POBJECT_HANDLE_ATTRIBUTE_INFORMATION HandleInfo)
 {
@@ -227,6 +229,7 @@ ObpDeleteHandle(PHANDLE_TABLE HandleTable,
 
 
 NTSTATUS
+NTAPI
 ObDuplicateObject(PEPROCESS SourceProcess,
                  PEPROCESS TargetProcess,
                  HANDLE SourceHandle,
@@ -540,7 +543,9 @@ DuplicateHandleCallback(PHANDLE_TABLE HandleTable,
   return Ret;
 }
 
-VOID ObCreateHandleTable(PEPROCESS Parent,
+VOID
+NTAPI
+ObCreateHandleTable(PEPROCESS Parent,
                         BOOLEAN Inherit,
                         PEPROCESS Process)
 /*
@@ -582,6 +587,7 @@ ObKillProcess(PEPROCESS Process)
 
 
 NTSTATUS
+NTAPI
 ObpCreateHandle(PEPROCESS Process,
               PVOID ObjectBody,
               ACCESS_MASK GrantedAccess,
@@ -1139,6 +1145,7 @@ ObInsertObject(IN PVOID Object,
 
 
 ULONG
+NTAPI
 ObpGetHandleCountByHandleTable(PHANDLE_TABLE HandleTable)
 {
   return HandleTable->HandleCount;
index 31be0d2..0add8fa 100644 (file)
@@ -239,6 +239,7 @@ ObQueryDeviceMapInformation(PEPROCESS Process,
 }
 
 VOID
+NTAPI
 ObpAddEntryDirectory(PDIRECTORY_OBJECT Parent,
                     POBJECT_HEADER Header,
                     PWSTR Name)
@@ -262,6 +263,7 @@ ObpAddEntryDirectory(PDIRECTORY_OBJECT Parent,
 
 
 VOID
+NTAPI
 ObpRemoveEntryDirectory(POBJECT_HEADER Header)
 /*
  * FUNCTION: Remove an entry from a namespace directory
index f931029..8cf4de1 100644 (file)
@@ -288,6 +288,7 @@ ObpReleaseCapturedAttributes(IN POBJECT_CREATE_INFORMATION ObjectCreateInfo)
  * RETURN VALUE
  */
 NTSTATUS
+NTAPI
 ObFindObject(POBJECT_CREATE_INFORMATION ObjectCreateInfo,
             PUNICODE_STRING ObjectName,
             PVOID* ReturnedObject,
@@ -1247,6 +1248,7 @@ ObGetObjectPointerCount(PVOID Object)
  *     Reference count.
  */
 ULONG
+NTAPI
 ObGetObjectHandleCount(PVOID Object)
 {
   POBJECT_HEADER Header;
index c7c300d..d7dffbf 100644 (file)
@@ -36,6 +36,7 @@ FAST_MUTEX ObpSdCacheMutex;
 /* FUNCTIONS ****************************************************************/
 
 NTSTATUS
+NTAPI
 ObpInitSdCache(VOID)
 {
   ULONG i;
@@ -207,6 +208,7 @@ ObpCompareSecurityDescriptors(IN PSECURITY_DESCRIPTOR Sd1,
 
 
 NTSTATUS
+NTAPI
 ObpAddSecurityDescriptor(IN PSECURITY_DESCRIPTOR SourceSD,
                         OUT PSECURITY_DESCRIPTOR *DestinationSD)
 {
@@ -277,6 +279,7 @@ ObpAddSecurityDescriptor(IN PSECURITY_DESCRIPTOR SourceSD,
 
 
 NTSTATUS
+NTAPI
 ObpRemoveSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor)
 {
   PSD_CACHE_ENTRY CacheEntry;
@@ -305,6 +308,7 @@ ObpRemoveSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor)
 
 
 VOID
+NTAPI
 ObpReferenceCachedSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor)
 {
   PSD_CACHE_ENTRY CacheEntry;
@@ -325,6 +329,7 @@ ObpReferenceCachedSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor)
 
 
 VOID
+NTAPI
 ObpDereferenceCachedSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor)
 {
   DPRINT("ObpDereferenceCachedSecurityDescriptor() called\n");
index 896bbe9..371cc9b 100644 (file)
@@ -131,6 +131,7 @@ ObpParseSymbolicLink(PVOID Object,
  */
 VOID 
 INIT_FUNCTION
+NTAPI
 ObInitSymbolicLinkImplementation (VOID)
 {
   UNICODE_STRING Name;
index b813944..51aae86 100644 (file)
@@ -229,6 +229,7 @@ PoUnregisterSystemState(
 }
 
 NTSTATUS
+NTAPI
 PopSetSystemPowerState(
   SYSTEM_POWER_STATE PowerState)
 {
@@ -291,6 +292,7 @@ PopSetSystemPowerState(
 
 VOID
 INIT_FUNCTION
+NTAPI
 PoInit(PLOADER_PARAMETER_BLOCK LoaderBlock,
        BOOLEAN ForceAcpiDisable)
 {