flat assembler
Message board for the users of flat assembler.

flat assembler > Macroinstructions > struct macro - problem with fields

Author
Thread Post new topic Reply to topic
deus



Joined: 12 Aug 2004
Posts: 5
Location: Poland
I have a structure:
Code:
struct IRP

        fwType                  dw ?
        cbSize                  dw ?

        MdlAddress              dd ?
        Flags                   dd ?
        union
                AssociatedIrp.MasterIrp         dd ?
                AssociatedIrp.IrpCount          dd ?
                AssociatedIrp.SystemBuffer      dd ?
        ends
        ThreadListEntry         LIST_ENTRY
        IoStatus                IO_STATUS_BLOCK
        RequestorMode           db ?
        PendingReturned         db ?
        StackCount              db ?
        CurrentLocation         db ?
        Cancel                  db ?
        CancelIrql              db ?
        ApcEnvironment          db ?
        AllocationFlags         db ?
        UserIosb                dd ?
        UserEvent               dd ?
                union
                struct
                        Overlay.AsynchronousParameters.UserApcRoutine  dd  ?
                        Overlay.AsynchronousParameters.UserApcContext  dd  ?
                ends
                Overlay.AllocationSize  dq ?
        ends
        CancelRoutine           dd ?
        UserBuffer              dd ?
        union
                struct
                union
                        Tail.Overlay.DeviceQueueEntry   KDEVICE_QUEUE_ENTRY
                        Tail.Overlay.DriverContext      rd 4
                ends
                Tail.Overlay.Thread                     dd ?
                Tail.Overlay.AuxiliaryBuffer            dd ?
                struct
                        Tail.ListEntry       LIST_ENTRY
                        union
                                Tail.Overlay.CurrentStackLocation       dd ?
                                Tail.Overlay.PacketType                 dd ?
                        ends
                ends
                Tail.Overlay.OriginalFileObject         dd ?
                ends
        Tail.Apc                KAPC
        Tail.CompletionKey      dd  ?
        ends

ends    

...and this code woks fine:
Code:
        virtual at ebx
        pIrp    IRP
        end virtual

        mov     eax, pIrp.Tail.Overlay.CurrentStackLocation    

but that one generates an error /'Error: Undefined symbol'/
Code:
        mov     eax, ebx+IRP.Tail.Overlay.CurrentStackLocation     

What is wrong?

ps: sorry for my english
Post 16 Sep 2005, 22:38
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.