Thema: Delphi UNION in C++ -> Delphi?

Einzelnen Beitrag anzeigen

Alter Mann

Registriert seit: 15. Nov 2003
Ort: Berlin
934 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#1

UNION in C++ -> Delphi?

  Alt 15. Feb 2010, 17:03
Hallo

habe hier ein Deklarationsproblem. Wie bekommen diese C-Union nach Delphi?
Code:
typedef union {
  [case(VSS_OBJECT_SNAPSHOT)]
    VSS_SNAPSHOT_PROP Snap;
  [case(VSS_OBJECT_PROVIDER)]
    VSS_PROVIDER_PROP Prov;
} VSS_OBJECT_UNION;
Diese Umsetzung erzeugt nur Fehlermeldungen:
Delphi-Quellcode:
  VSS_OBJECT_UNION = packed record
    case Integer of
      3 : (Snap : VSS_OBJECT_SNAPSHOT); //VSS_OBJECT_SNAPSHOT
      4 : (Prov : VSS_PROVIDER_PROP); //VSS_OBJECT_PROVIDER
    end;
  end;
Warum?

Vielen Dank für Tipps unf Hinweise

Alter Mann
  Mit Zitat antworten Zitat