home   |   А-Я   |   A-Z   |   меню


Дамп памяти (взят из PE.TXT)

Далее я привожу целиком фрагмент файла PE.TXT. Это — конкретный пример размещения ресурсов с подробным дампом памяти.

The following is an example for an app. which wants to use the following data as resources:

TypeId# NameId# Language ID Resource Data

00000001 00000001 0 00010001

00000001 00000001 1 10010001

00000001 00000002 0 00010002

00000001 00000003 0 00010003

00000002 00000001 0 00020001

00000002 00000002 0 00020002

00000002 00000003 0 00020003

00000002 00000004 0 00020004

00000009 00000001 0 00090001

00000009 00000009 0 00090009

00000009 00000009 1 10090009

00000009 00000009 2 20090009


Then the Resource Directory in the Portable format looks like:

Offset Data

0000: 00000000 00000000 00000000 00030000 (3 entries in this directory)

0010: 00000001 80000028 (TypeId #1, Subdirectory at offset 0x28)

0018: 00000002 80000050 (TypeId #2, Subdirectory at offset 0x50)

0020: 00000009 80000080 (TypeId #9, Subdirectory at offset 0x80)

0028: 00000000 00000000 00000000 00030000 (3 entries in this directory)

0038: 00000001 800000A0 (NameId #1, Subdirectory at offset 0xA0)

0040: 00000002 00000108 (NameId #2, data desc at offset 0x108)

0048: 00000003 00000118 (NameId #3, data desc at offset 0x118)

0050: 00000000 00000000 00000000 00040000 (4 entries in this directory)

0060: 00000001 00000128 (NameId #1, data desc at offset 0x128)

0068: 00000002 00000138 (NameId #2, data desc at offset 0x138)

0070: 00000003 00000148 (NameId #3, data desc at offset 0x148)

0078: 00000004 00000158 (NameId #4, data desc at offset 0x158)

0080: 00000000 00000000 00000000 00020000 (2 entries in this directory)

0090: 00000001 00000168 (NameId #1, data desc at offset 0x168)

0098: 00000009 800000C0 (NameId #9, Subdirectory at offset 0xC0)

00A0: 00000000 00000000 00000000 00020000 (2 entries in this directory)

00B0: 00000000 000000E8 (Language ID 0, data desc at offset 0xE8

00B8: 00000001 000000F8 (Language ID 1, data desc at offset 0xF8

00C0: 00000000 00000000 00000000 00030000 (3 entries in this directory)

00D0: 00000001 00000178 (Language ID 0, data desc at offset 0x178

00D8: 00000001 00000188 (Language ID 1, data desc at offset 0x188

00E0: 00000001 00000198 (Language ID 2, data desc at offset 0x198


00E8: 000001A8 (At offset 0x1A8, for TypeId #1, NameId #1, Language id #0

00000004 (4 bytes of data)

00000000 (codepage)

00000000 (reserved)

00F8: 000001AC (At offset 0x1AC, for TypeId #1, NameId #1, Language id #1

00000004 (4 bytes of data)

00000000 (codepage)

00000000 (reserved)

0108: 000001B0 (At offset 0x1B0, for TypeId #1, NameId #2,

00000004 (4 bytes of data)

00000000 (codepage)

00000000 (reserved)

0118: 000001B4 (At offset 0x1B4, for TypeId #1, NameId #3,

00000004 (4 bytes of data)

00000000 (codepage)

00000000 (reserved)

0128: 000001B8 (At offset 0x1B8, for TypeId #2, NameId #1,

00000004 (4 bytes of data)

00000000 (codepage)

00000000 (reserved)

0138: 000001BC (At offset 0x1BC, for TypeId #2, NameId #2,

00000004 (4 bytes of data)

00000000 (codepage)

00000000 (reserved)

0148: 000001C0 (At offset 0x1C0, for TypeId #2, NameId #3,

00000004 (4 bytes of data)

00000000 (codepage)

00000000 (reserved)

0158: 000001C4 (At offset 0x1C4, for TypeId #2, NameId #4,

00000004 (4 bytes of data)

00000000 (codepage)

00000000 (reserved)

0168: 000001C8 (At offset 0x1C8, for TypeId #9, NameId #1,

00000004 (4 bytes of data)

00000000 (codepage)

00000000 (reserved)

0178: 000001CC (At offset 0x1CC, for TypeId #9, NameId #9, Language id #0

00000004 (4 bytes of data)

00000000 (codepage)

00000000 (reserved)

0188: 000001D0 (At offset 0x1D0, for TypeId #9, NameId #9, Language id #1

00000004 (4 bytes of data)

00000000 (codepage)

00000000 (reserved)

0198: 000001D4 (At offset 0x1D4, for TypeId #9, NameId #9, Language id #2

00000004 (4 bytes of data)

00000000 (codepage)

00000000 (reserved)


And the data for the resources will look like:

01A8: 00010001

01AC: 10010001

01B0: 00010002

01B4: 00010003

01B8: 00020001

01BC: 00020002

01C0: 00020003

01C4: 00020004

01C8: 00090001

01CC: 00090009

01D0: 10090009

01D4: 20090009


Описание формата ресурсов в MS PE COFF. | Виртуальная библиотека Delphi | Программирование на основе Win32 API в Delphi