The MASM Forum Archive 2004 to 2012

Project Support Forums => IDE Development and Support => RadAsm Support Forum => Topic started by: Polizei on January 23, 2005, 06:39:57 PM

Title: IMAGE_SECTION_HEADER
Post by: Polizei on January 23, 2005, 06:39:57 PM
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
Title: Re: IMAGE_SECTION_HEADER
Post by: KetilO on January 24, 2005, 07:41:13 AM
Thanks

I will fix it.

KetilO
Title: Re: IMAGE_SECTION_HEADER
Post by: KetilO on January 24, 2005, 10:16:54 AM
Hi

Here is the new masmApiStruct.api file.

KetilO

[attachment deleted by admin]
Title: New prob :>
Post by: Polizei on January 24, 2005, 05:39:39 PM
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...
Title: Re: IMAGE_SECTION_HEADER
Post by: Polizei on January 24, 2005, 05:49:49 PM
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,...

Title: Re: IMAGE_SECTION_HEADER
Post by: KetilO on January 25, 2005, 08:01:24 AM
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
Title: Re: IMAGE_SECTION_HEADER
Post by: Polizei on January 26, 2005, 07:26:09 PM
(http://polizei.data.bg/shot2.JPG)

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

The
(http://polizei.data.bg/shot1.JPG)
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...