Question

I have some masm syntax code on Windows in this way:

stru_40DBA0 dd 0FFFFFFFEh       ; GSCookieOffset ; SEH scope table for function 402B22
dd 0            ; GSCookieXOROffset
dd 0FFFFFFC0h       ; EHCookieOffset
dd 0            ; EHCookieXOROffset
dd 0FFFFFFFEh       ; ScopeRecord.EnclosingLevel
dd 0            ; ScopeRecord.FilterFunc
offset $LN19        ; ScopeRecord.HandlerFunc
.....
Foo proc near
....
$LN19:
....

masm will generate errors at the offset $LN19 line, and I tried to modify it in this way:

PTR PROTO $LN29

Could anyone give me some help on how to declare this? Thank you!

Was it helpful?

Solution

There are really two things you need to do:

  1. Ensure the label is public so it can be seen where you're using its offset.
  2. Ensure the label has been declared where you're using its offset.

The easy way to do the latter is define your structure after the label itself has been defined.

To make the label public, you can either declare it public explicitly, like:

public $LN19

...or where you've defined the label, you can use two colons instead of one:

$LN19::
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top