[1/6] Add a partial COFF library support to the winedump

Dmitry Timoshkov dmitry at codeweavers.com
Sun Nov 26 02:03:25 CST 2006


Hello,

Changelog:
    include: Add some structures a definitions required for the COFF library dumper.

---
 include/winnt.h |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 50 insertions(+), 0 deletions(-)

diff --git a/include/winnt.h b/include/winnt.h
index fe83ff1..812ab80 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -22,6 +22,7 @@ #ifndef _WINNT_
 #define _WINNT_
 
 #include <basetsd.h>
+#include <guiddef.h>
 
 #ifndef RC_INVOKED
 #include <ctype.h>
@@ -604,6 +605,7 @@ #define HEAP_FREE_CHECKING_ENABLED      
 #define HEAP_DISABLE_COALESCE_ON_FREE   0x00000080
 #define HEAP_CREATE_ALIGN_16            0x00010000
 #define HEAP_CREATE_ENABLE_TRACING      0x00020000
+#define HEAP_CREATE_ENABLE_EXECUTE      0x00040000
 
 /* This flag allows it to create heaps shared by all processes under win95,
    FIXME: correct name */
@@ -2595,6 +2597,7 @@ typedef struct _IMAGE_IMPORT_BY_NAME {
 	BYTE	Name[1];
 } IMAGE_IMPORT_BY_NAME,*PIMAGE_IMPORT_BY_NAME;
 
+#include <pshpack8.h>
 /* Import thunk */
 typedef struct _IMAGE_THUNK_DATA64 {
 	union {
@@ -2604,6 +2607,7 @@ typedef struct _IMAGE_THUNK_DATA64 {
 		ULONGLONG AddressOfData;
 	} u1;
 } IMAGE_THUNK_DATA64,*PIMAGE_THUNK_DATA64;
+#include <poppack.h>
 
 typedef struct _IMAGE_THUNK_DATA32 {
 	union {
@@ -2886,6 +2890,52 @@ typedef struct _IMAGE_ARCHIVE_MEMBER_HEA
 
 #define IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR 60
 
+typedef struct _IMPORT_OBJECT_HEADER
+{
+    WORD     Sig1;
+    WORD     Sig2;
+    WORD     Version;
+    WORD     Machine;
+    DWORD    TimeDateStamp;
+    DWORD    SizeOfData;
+    union
+    {
+        WORD Ordinal;
+        WORD Hint;
+    } DUMMYUNIONNAME;
+    WORD     Type : 2;
+    WORD     NameType : 3;
+    WORD     Reserved : 11;
+} IMPORT_OBJECT_HEADER;
+
+#define IMPORT_OBJECT_HDR_SIG2  0xffff
+
+typedef enum IMPORT_OBJECT_TYPE
+{
+    IMPORT_OBJECT_CODE = 0,
+    IMPORT_OBJECT_DATA = 1,
+    IMPORT_OBJECT_CONST = 2
+} IMPORT_OBJECT_TYPE;
+
+typedef enum IMPORT_OBJECT_NAME_TYPE
+{
+    IMPORT_OBJECT_ORDINAL = 0,
+    IMPORT_OBJECT_NAME = 1,
+    IMPORT_OBJECT_NAME_NO_PREFIX = 2,
+    IMPORT_OBJECT_NAME_UNDECORATE = 3
+} IMPORT_OBJECT_NAME_TYPE;
+
+typedef struct _ANON_OBJECT_HEADER
+{
+    WORD     Sig1;
+    WORD     Sig2;
+    WORD     Version;
+    WORD     Machine;
+    DWORD    TimeDateStamp;
+    CLSID    ClassID;
+    DWORD    SizeOfData;
+} ANON_OBJECT_HEADER;
+
 /*
  * Resource directory stuff
  */
-- 
1.4.2






More information about the wine-patches mailing list