[REBOL] Re: char arrays in structs
From: nitsch-lists:netcologne at: 5-Sep-2003 18:17
Am Donnerstag, 4. September 2003 16:49 schrieb Gregg Irwin:
> Does anyone have a better way to map char arrays in structs than
> creating separate elements that take up the correct total amount of
> space? e.g.
>
> RASDIALPARAMSA
> {
> DWORD dwSize;
> CHAR szEntryName[ RAS_MaxEntryName + 1 ];
> ...
>
> RASDIALPARAMSA: make struct! [
> dwSize [integer!]
> szEntryName1 [char!]
> szEntryName2 [char!]
> szEntryName3 [char!]
> szEntryName4 [char!]
> ...
>
you can replace the struct with a string and use offsets.
IIRC i have a sample somewhere on this list.
But do not remember a good search-word :(
> -- Gregg
-Volker