![]() |
C# source in Delphi portieren!
Hallo Zusammen,
es geht um eine ActivX-Komponente welche eine Beispielanwendung in c++, VB und C# aber leinder kein Delphi hat. Die folgende Zeile erzeugt zur Laufzeit ein Objekt. Das Objekt iwGeoPoint hat jedoch keinen Constructor Create. IWGEOOBJECTSLib.iwGeoPoint point = new IWGEOOBJECTSLib.iwGeoPoint(); Wie kann ich das Objekt in Delphi erzeugen? Gruß Kosts |
Re: C# source in Delphi portieren!
IWGEOOBJECTSLib.iwGeoPoint point = new IWGEOOBJECTSLib.iwGeoPoint();
des is n constructor. ind delphi:
Delphi-Quellcode:
point := IWGEOOBJECTSLib.iwGeoPoint.Create();
|
Re: C# source in Delphi portieren!
Hallo Nailor,
das dachte ich auch, aber genau das funkt nicht weil iwGeoPoint keine Methode Create hat. iwGeoPoint.Create gibt es nicht Irgend eine Idee? Gruß kostas |
Re: C# source in Delphi portieren!
die funktion(en) mit gleichem namen wie die klasse sind constructoren. wenn du nach d portieren willst, musst du die entspr. umbenennen
|
Re: C# source in Delphi portieren!
Hallo Nailor,
entschuldige bitte wenn ich Dich nicht verstehe. Ist es Dir möglich mir ein kleines Beispiel zu erzeugen. Übrigens in den C++ sourcecodes habe ich eine ähnliche stelle gefunden. In C++ sieht es so aus: IiwGeoPoint iwGeoPoint; iwGeoPoint.CreateDispatch( "IwGeoObjects.iwGeoPoint.1" ); Ich hoffe es ist das gleiche :-( Unter Delphi kenne ich eigentlich nur eine Möglichkeit: procedure ... var MyPoint :iwGeoPoint; begin MyPoint := iwGeoPoint.Create; try MyPoint.irgendwas; finally MyPoint.free; end; end; Gruß Kostas. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:21 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz