News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

IMAGE_SECTION_HEADER

Started by Polizei, January 23, 2005, 06:39:57 PM

Previous topic - Next topic

Polizei

Hi KetilO, Nice IDE IMHO :>
I'm writing this for the IMAGE_SECTION_HEADER structure in the .API files in MASM.
The 'VirtualSize' and the 'PhysicalAddress' members (according to WINDOWS.INC) are placed in an union called 'Misc'. So, you can fix it. I make it manually each time I install a newer version of the RAD :) But some people may can't fix it.
And they may do NOT know for the union and their programs will NOT get compiled :<
--
Regards : Polizei.Co

KetilO


KetilO

#2
Hi

Here is the new masmApiStruct.api file.

KetilO

[attachment deleted by admin]

Polizei

Hi KetilO, 10x for fixin' the masmApiStruct.
I wanna ask why doesn't the Rad show me the listbox when I've defined a STRUC in the .CONST, then the real structure in the .DATA and when I try to make something like

.CONST
SEH struc
     SafeEIP dd ?
     SafeEBP dd ?
     SafeESP dd ?
SEH ends
.DATA
     seh SEH <>
.CODE
...
MOV    seh.SafeEIP, bla-bla-bla


nothing is going on :{
I have to use the
MOV    seh.SEH.SafeEIP
to make the listbox appear.

Another, the PROGRESS bar in the dialog editor. The lowest BIT of the STYLE dword for this control is SMOOTH, but it's not added.
Regards...

Polizei

IMAGE_SECTION_HEADER,Name1,Misc.PhysicalAddress,Misc.VirtualSize,...

The IMAGE_SECTION_HEADER is fixed now, yeah it's fixed.
But I can offer a nicer solution :

IMAGE_SECTION_HEADER_MISC_UNION,PhysicalAddress,VirtualSize
IMAGE_SECTION_HEADER,Name1,Misc:IMAGE_SECTION_HEADER_MISC_UNION,...


KetilO

Hi

The parser seem a litte nervous and will not accept more than one space or tab in front of:

seh SEH <>

I will fix it.

I am using Windows.inc to create the masmApiStruct.api

IMAGE_SECTION_HEADER STRUCT
    Name1 db IMAGE_SIZEOF_SHORT_NAME dup(?)
    union Misc
        PhysicalAddress dd  ?
        VirtualSize dd      ?
    ends
    VirtualAddress dd       ?
    SizeOfRawData dd        ?
    PointerToRawData dd     ?
    PointerToRelocations dd ?
    PointerToLinenumbers dd ?
    NumberOfRelocations dw  ?
    NumberOfLinenumbers dw  ?
    Characteristics dd      ?
IMAGE_SECTION_HEADER ENDS

The union is declared inside the structure, not outside as you are suggesting.

KetilO

Polizei



Sorry, I've forotten about the new ListBox styling ;(

The

is better if the union is called IMAGE_SECTION_HEADER_MISC_UNION, but you can name it MISC00/MISC??.
Anyway it's now OK so don't worry ;)

Regards...