Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#5

Re: Union Übersetzung nach Pascal

  Alt 12. Mär 2007, 15:53
Ok danke aber was heißt das hier:

Delphi-Quellcode:
_PARTITION_INFORMATION_EX = record
  PartitionStyle: PARTITION_STYLE;
  StartingOffset: LARGE_INTEGER;
  PartitionLength: LARGE_INTEGER;
  PartitionNumber: ULONG;
  RewritePartition: Boolean;
  case Integer of
    0: (Mbr: PARTITION_INFORMATION_MBR);
    1: (Gpt: PARTITION_INFORMATION_GPT);
end;
Und wie soll ich die markierte Zeile in diesem Record übersetzen ? o.O

Code:
typedef struct _DRIVE_LAYOUT_INFORMATION_EX {
    ULONG PartitionStyle;
    ULONG PartitionCount;
    union {
        DRIVE_LAYOUT_INFORMATION_MBR Mbr;
        DRIVE_LAYOUT_INFORMATION_GPT Gpt;
    };
    PARTITION_INFORMATION_EX PartitionEntry[1]; //<---- Was soll die [1] ?
}
PS: Man man Michi -.- Erst gucken dann schreiben...

PartitionEntry: array [0..0] of PARTITION_INFORMATION_EX; Gruß
Neutral General
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat