typedef struct _FILE_OBJECTID_INFORMATION {
LONGLONG FileReference;
UCHAR ObjectId[16];
union {
struct {
UCHAR BirthVolumeId[16];
UCHAR BirthObjectId[16];
UCHAR DomainId[16];
} DUMMYSTRUCTNAME;
UCHAR ExtendedInfo[48];
} DUMMYUNIONNAME;
} FILE_OBJECTID_INFORMATION, *PFILE_OBJECTID_INFORMATION;
How to translate such a union to Delphi?
The Pascal equivalent of a C
unionis known as a variant record.As for the rest, it’s pretty routine:
LONGLONGis a 64 bit integer, andUCHARisunsigned char, orAnsiCharin Delphi.It’s possible that
Bytemay be more appropriate thanAnsiChar. It’s a bit hard to tell of course because C, unlike Pascal, doesn’t have separate types forByteandAnsiChar. But these arrays look to me as though they would be read as text so my guess is thatAnsiCharwould be more appropriate.