typedef struct
{
DWORD oNextObject; //Offset to COM Interfaces Info
DWORD oObjectName; //Offset to Object Name
DWORD oObjectDescription; //Offset to Object Description
DWORD lInstancing; //Instancing Mode
DWORD lObjectID; //Current Object ID in the Project
BYTE uuidObjectClsID[15]; //CLSID of Object
DWORD fIsInterface; // Specifies if the next CLSID is valid
DWORD oObjectClsID; // Offset to CLSID of Object Interface
DWORD oControlClsID; // Offset to CLSID of Control Interface
DWORD fIsControl; // Specifies if the CLSID above is valid
DWORD lMiscStatus; // OLEMISC Flags (see MSDN docs)
BYTE fClassType; // Class Type
BYTE fObjectType; // Flag identifying the Object Type
WORD iToolboxBitmap32; // Control Bitmap ID in Toolbox
WORD iDefaultIcon; // Minimized Icon of Control Window
WORD fIsDesigner; // Specifies whether this is a Designer
DWORD oDesignerData; // Offset to Designer Data
// sizeof() = 0x44
}COMRegInfo_t;
'Object Type part of tCOMRegInfo//没有翻译的意义,就没有翻译,只是看看而已
'+-------+---------------+-------------------------------------------+
'| Value | Name | Description |
'+-------+---------------+-------------------------------------------+
'| 0x02 | Designer | A Visual Basic Designer for an Add.in |
'| 0x10 | Class Module | A Visual Basic Class |
'| 0x20 | User Control | A Visual Basic ActiveX User Control (OCX) |
'| 0x80 | User Document | A Visual Basic User Document |
'+-------+---------------+-------------------------------------------+
typedef struct //这个是OBJECT 的总表,可以索引以后的每个OBJECT
{
DWORD lNull1 As Long; //没有用的填充东西
DWORD aExecProj; //VA指向一块内存结构(研究下来既不没见着这个东西由什么用处
DWORD aProjectInfo2; //VA指向Project Info 2
DWORD Const1; //没有用的填充东西
DWORD Null2; //没有用的填充东西
DWORD lpProjectObject As Long ' 0x14
DWORD Flag1; //标志1
DWORD Flag2; //标志2
DWORD Flag3; //标志3
DWORD Flag4; //标志4
WORD fCompileType; //Internal flag used during compilation
WORD ObjectCount1; //OBEJCT数量1????
WORD iCompiledObjects; //编译后OBJECT数量
WORD iObjectsInUse As Integer; //Updated in the IDE to correspond the total number ' but will go up or down when initializing/unloading modules.
DWORD aObject; //VA指向第一个OBJECT_t结构,很重要
DWORD Null3; //没有用的填充东西
DWORD Null4; //没有用的填充东西
DWORD Null5; //没有用的填充东西
DWORD aProjectName; //执行工程名字的字符串
DWORD LangID1; //language ID1
DWORD LangID2; //language ID2
DWORD Null6; //没有用的填充东西
DWORD Const3; //没有用的填充东西
' 0x54
}ObjectTable_t;
typedef struct//这个是显示这个OBJECT信息的结构,每一个OBJECT都有一个
{
WORD Flag1;
WORD ObjectIndex;
DWORD aObjectTable;
DWORD Null1;
DWORD aSmallRecord; // when it is a module this value is -1 [better name?]
DWORD Const1;
DWORD Null2;
DWORD aObject;
DWORD RunTimeLoaded; //[can someone verify this?]
DWORD NumberOfProcs;
DWORD aProcTable;
WORD iConstantsCount; // Number of Constants
WORD iMaxConstants; // Maximum Constants to allocate.
DWORD Flag5;
WORD Flag6;
WORD Flag7;
WORD aConstantPool;
// sizeof() = 0x38
'the rest is optional items[OptionalObjectInfo]
}ObjectInfo_t;
Private Type tOptionalObjectInfo ' if ((tObject.ObjectType AND &H80)=&H80)
fDesigner As Long ' 0x00 (0d) If this value is 2 then this object is a designer
aObjectCLSID As Long ' 0x04
Null1 As Long ' 0x08
aGuidObjectGUI As Long ' 0x0C
lObjectDefaultIIDCount As Long ' 0x10 01 00 00 00
aObjectEventsIIDTable As Long ' 0x14
lObjectEventsIIDCount As Long ' 0x18
aObjectDefaultIIDTable As Long ' 0x1C
ControlCount As Long ' 0x20
aControlArray As Long ' 0x24
iEventCount As Integer ' 0x28 (40d) Number of Events
iPCodeCount As Integer ' 0x2C
oInitializeEvent As Integer ' 0x2C (44d) Offset to Initialize Event from aMethodLinkTable
oTerminateEvent As Integer ' 0x2E (46d) Offset to Terminate Event from aMethodLinkTable
aEventLinkArray As Long ' 0x30 Pointer to pointers of MethodLink
aBasicClassObject As Long ' 0x34 Pointer to an in-memory
Null3 As Long ' 0x38
Flag2 As Long ' 0x3C usually null
' 0x40 <-- Structure size
End Type
Type tProjectInfo2
lNull1 As Long ' 0x00 (00d)
aObjectTable As Long ' 0x04 (04d) Pointer to Object Table
lConst1 As Long ' 0x08 (08d)
lNull2 As Long ' 0x0C (12d)
aObjectDescriptorTable As Long ' 0x10 (16d) Pointer to a table of ObjectDescriptors
lNull3 As Long ' 0x14 (20d)
aNTSPrjDescription As Long ' 0x18 (24d) Pointer to Project Description
aNTSPrjHelpFile As Long ' 0x1C (28d) Pointer to Project Help File
lConst2 As Long ' 0x20 (32d)
lHelpContextID As Long ' 0x24 (36d) Project Help Context ID
' 0x28 (40d) <- Structure size
End Type
Type ObjectDescriptor
lNull1 As Long '0x00 (00d)
aObjectInfo As Long '0x04 (04d) Pointer to Object Info
lConst1 As Long '0x08 (08d)
lNull2 As Long '0x0C (12d)
lFlag1 As Long '0x10 (16d)
lNull3 As Long '0x14 (20d)
aUnknown1 As Long '0x18 (24d)
lNull4 As Long '0x1C (28d)
aUnknown2 As Long '0x20 (32d)
aUnknown3 As Long '0x24 (36d)
aUnknown4 As Long '0x28 (40d)
lNull5 As Long '0x2C (44d)
lNull6 As Long '0x30 (48d)
lNull7 As Long '0x34 (52d)
lFlag2 As Long '0x38 (56d)
fObjectType As Long '0x3C (60d) Flags for this Object
'0x40 (64d) <- Structure Size
End Type