Syntax:
$bind(type-string-expr, var-string-expr, addr-expr);
All expressions are evaluated at run time. First two are automatically converted to strings, while the third is expected to be of integer type.
This directive instructs parser to bind another structure to a given address. Binding is delayed until the current structure binding is successfully finished.
You must reference the full type name, for example struct MyStruct
, not the MyStruct
, and the referenced type must have been declared as public.
public struct B
{
// …
};
public struct A
{
int Offset;
if (Offset != 0)
$bind("struct B","pB",Offset);
};