News:

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

Nested, named structures

Started by aleksazr, August 20, 2009, 08:09:12 AM

Previous topic - Next topic

aleksazr

WINDOW struct
  struct win
    handle HANDLE ?
  ends
WINDOW ends

mainwin WINDOW <>

1. mov eax,[mainwin].handle
2. mov eax,[mainwin].win.handle

Both [1] and [2] will work (and access the same field).

What can I do to make masm acccept only [2] and produce
an error (eg. 'variable not found') on [1]?


Is there another way (switch?), except this:

WIN struct
  handle HANDLE ?
ends

WINDOW struct
  win WIN <>
WINDOW ends

dedndave

QuoteWIN struct
  handle HANDLE ?
ends

WINDOW struct
  win WIN <>
WINDOW ends
that is how to do it