AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

C# source in Delphi portieren!

Ein Thema von Kostas · begonnen am 27. Sep 2004 · letzter Beitrag vom 27. Sep 2004
Antwort Antwort
Kostas

Registriert seit: 14. Mai 2003
Ort: Gerstrhofen
1.062 Beiträge
 
Delphi 10 Seattle Enterprise
 
#1

C# source in Delphi portieren!

  Alt 27. Sep 2004, 15:09
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
  Mit Zitat antworten Zitat
Benutzerbild von nailor
nailor

Registriert seit: 12. Dez 2002
Ort: Karlsruhe
1.989 Beiträge
 
#2

Re: C# source in Delphi portieren!

  Alt 27. Sep 2004, 15:25
IWGEOOBJECTSLib.iwGeoPoint point = new IWGEOOBJECTSLib.iwGeoPoint();

des is n constructor.

ind delphi:

point := IWGEOOBJECTSLib.iwGeoPoint.Create();
Michael N.
http://nailor.devzero.de/code/sharpmath/testing/ --- Tests, Feedback, Anregungen, ... aller Art sehr willkommen!
::: don't try so hard - it'll happen for a reason :::
  Mit Zitat antworten Zitat
Kostas

Registriert seit: 14. Mai 2003
Ort: Gerstrhofen
1.062 Beiträge
 
Delphi 10 Seattle Enterprise
 
#3

Re: C# source in Delphi portieren!

  Alt 27. Sep 2004, 15:40
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
  Mit Zitat antworten Zitat
Benutzerbild von nailor
nailor

Registriert seit: 12. Dez 2002
Ort: Karlsruhe
1.989 Beiträge
 
#4

Re: C# source in Delphi portieren!

  Alt 27. Sep 2004, 16:04
die funktion(en) mit gleichem namen wie die klasse sind constructoren. wenn du nach d portieren willst, musst du die entspr. umbenennen
Michael N.
http://nailor.devzero.de/code/sharpmath/testing/ --- Tests, Feedback, Anregungen, ... aller Art sehr willkommen!
::: don't try so hard - it'll happen for a reason :::
  Mit Zitat antworten Zitat
Kostas

Registriert seit: 14. Mai 2003
Ort: Gerstrhofen
1.062 Beiträge
 
Delphi 10 Seattle Enterprise
 
#5

Re: C# source in Delphi portieren!

  Alt 27. Sep 2004, 16:29
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.
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:29 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz