How do I translate a C union into Delphi?

后端 未结 2 1080
typedef struct _FILE_OBJECTID_INFORMATION {
    LONGLONG FileReference;
    UCHAR ObjectId[16];
    union {
        struct {
           


        
2条回答
  •  醉梦人生
    2020-11-29 13:56

    Similar structure can be found in JEDI API Lib:

      _FILE_OBJECTID_BUFFER = record
    
        //
        //  This is the portion of the object id that is indexed.
        //
    
        ObjectId: array [0..15] of BYTE;
    
        //
        //  This portion of the object id is not indexed, it's just
        //  some metadata for the user's benefit.
        //
    
        case Integer of
          0: (
            BirthVolumeId: array [0..15] of BYTE;
            BirthObjectId: array [0..15] of BYTE;
            DomainId: array [0..15] of BYTE);
          1: (
            ExtendedInfo: array [0..47] of BYTE);
      end;
    

提交回复
热议问题