The MASM Forum Archive 2004 to 2012

Project Support Forums => GoAsm Assembler and Tools => Topic started by: Yuri on September 06, 2009, 01:20:22 PM

Title: Overriding a structure with an indirect definition
Post by: Yuri on September 06, 2009, 01:20:22 PM
Hi Jeremy,

I encountered this error when using Edgar's headers. So that you don't have to look through them, I've extracted the relevant material. In this example, a GUID structure must be overridden differently, depending on whether UNICODE is defined.

GUID STRUCT
    Data1   dd
    Data2   dw
    Data3   dw
    Data4   db 8 DUP
ENDS

#define GUID_IID_IShellLinkA <0x000214EE,0,0,<0xC0,0,0,0,0,0,0,0x46>>
#define GUID_IID_IShellLinkW <0x000214F9,0,0,<0xC0,0,0,0,0,0,0,0x46>>

#ifdef UNICODE
    #define GUID_IID_IShellLink GUID_IID_IShellLinkW
#else
    #define GUID_IID_IShellLink GUID_IID_IShellLinkA
#endif


DATA SECTION

IId   GUID    GUID_IID_IShellLink


CODE SECTION

Start:
    xor eax,eax
    ret


This is the error message from GoAsm:
Quote
GoAsm.Exe Version 0.56.7 - Copyright Jeremy Gordon 2001/9 - JG@JGnet.co.uk

Error!
Line 20 of assembler source file (guid.asm):-
Unexpected material:-
<0x000214EE,0,0,<0xC0,0,0,0,0,0,0,0x46>>
Defined in Line 8 of assembler source file (guid.asm):
GUID_IID_IShellLinkA <0x000214EE,0,0,<0xC0,0,0,0,0,0,0,0x46>>
Title: Re: Overriding a structure with an indirect definition
Post by: jorgon on September 10, 2009, 11:58:09 AM
Hi Yuri

Thanks for reporting this.

In order to achieve this, GoAsm needs to look one level deeper into the defines for initialisation information provided when the structure is used.

I can add this, and so I shall come back to you when this has been done.

Title: Re: Overriding a structure with an indirect definition
Post by: jorgon on September 15, 2009, 05:43:17 AM
Hi Yuri

This has now been added in GoAsm (Version 0.56.8) (http://www.jorgon.freeserve.co.uk/Goasm.zip).
Title: Re: Overriding a structure with an indirect definition
Post by: Yuri on September 15, 2009, 12:37:08 PM
Jeremy, thanks a lot for both improvements! I very much appreciate that! :U