[ros-dev] Re:[ros-svn] [ion] 12748: Fix incorrect LPC Object export...we export pointers not the object itself! Also remove more TIME stuf

Hartmut Birr hartmut.birr at gmx.de
Mon Jan 3 16:01:16 CET 2005


Filip Navara schrieb:

> ea at iol.it wrote:
>
>>> Fix incorrect LPC Object export...we export pointers not the object 
>>> itself!   
>>
>>
>> Why?
>>
>> Aren't DATA symbols exported by DLLs pointers?
>>  
>>
> Yes, they are! Alex's change is WRONG!
>
> - Filip

I think that Alex's changes are correct. If Alex's changes are wrong, 
all other type object initialisations are also wrong. There is only one 
little bug, the EXPORTED/IMPORTED definition is missing.

- Hartmut

Index: ntoskrnl/lpc/port.c
===================================================================
--- ntoskrnl/lpc/port.c (Revision 12753)
+++ ntoskrnl/lpc/port.c (Arbeitskopie)
@@ -21,7 +21,7 @@

 /* GLOBALS 
*******************************************************************/

-POBJECT_TYPE   LpcPortObjectType = 0;
+POBJECT_TYPE   EXPORTED LpcPortObjectType = NULL;
 ULONG          LpcpNextMessageId = 0; /* 0 is not a valid ID */
 FAST_MUTEX     LpcpLock; /* global internal sync in LPC facility */

Index: ntoskrnl/include/internal/port.h
===================================================================
--- ntoskrnl/include/internal/port.h    (Revision 12753)
+++ ntoskrnl/include/internal/port.h    (Arbeitskopie)
@@ -140,7 +140,13 @@
 NTSTATUS
 NiInitPort (VOID);

-extern POBJECT_TYPE    LpcPortObjectType;
+#ifdef __NTOSKRNL__
+extern POBJECT_TYPE EXPORTED LpcPortObjectType;
+#else
+/* Usually not necessary, because nobody should include an internal 
header from ntoskrnl. */
+extern POBJECT_TYPE IMPORTED LpcPortObjectType;
+#endif
+
 extern ULONG           LpcpNextMessageId;
 extern FAST_MUTEX      LpcpLock;



More information about the Ros-dev mailing list