typedef struct
DWORD cbStruct;
union
DWORD dwControlID;
DWORD dwControlType;
};
DWORD cControls;
} MyType
Pascal
You need a variant record to get the equivalent of a
C union. Something like this:
VAR
Overlay:
RECORD
CASE INTEGER OF
0: (dwControlID: INTEGER);
1: (dwControlType: INTEGER)
END; // Only one "End" here
If you only have a single integer value overlaying another
integer value, you might want to use the ABSOLUTE
keyword:
VAR
dwControlID: INTEGER;
dwControlType: INTEGER ABSOLUTE dwControlID;
efg
_________________________________________
efg's Computer Lab: http://infomaster.net/external/efg
Earl F. Glynn E-Mail: Earl...@att.net
MedTech Research Corporation, Lenexa, KS USA
All fields after UNION section must be moved into UNION.
use this:
type
MyType = record
cbStruct: LongInt;
case Integer of
1: ( dwControlID: LongInt;
cControls : LongInt
);
2: ( dwControlType: LongInt
)
end;
or this:
type
MyType = record
case cbStruct: LongInt of
sControlID: (
dwControlID: LongInt;
cControls : LongInt
);
sControlType: (
dwControlType: LongInt
)
end;
Mark...
Boris Podchezertseff wrote in message <354416FE...@finros.ru>...
> dwControlID: LongInt;
> cControls : LongInt
> );
> sControlType:
> dwControlType: LongInt
> )
> end;
>