Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi Problem bei Funktionsaufruf aus DLL (https://www.delphipraxis.net/89630-problem-bei-funktionsaufruf-aus-dll.html)

Angel4585 3. Apr 2007 12:10


Problem bei Funktionsaufruf aus DLL
 
Hallo,

ich habe in meinem Hauptprogramm eine Funktion, welche als Parameter eine Stringvariable hat.
Diese Funktion übergebe ich an die DLL und rufe sie aus der DLL aus auf.
Allerdings bekomme ich jetzt an der Stelle im Quellcode eine "access violation" (Sonst steht immer Zugriffsverletzung da :shock: ).
Weis jemand an was das liegen könnte?

Delphi-Quellcode:
function THauptprogramm.Funktion(APfad : string; AExist : Boolean):Boolean;
var str : string;
begin
str:='Der Pfad lautet:'+APfad;//Hier kommt der Fehler
ShowMessage(str);
end;
Danke schonmal

:angel:

Robert Marquardt 3. Apr 2007 12:16

Re: Problem bei Funktionsaufruf aus DLL
 
ShareMem verwendet?

Angel4585 3. Apr 2007 12:20

Re: Problem bei Funktionsaufruf aus DLL
 
Watt? ne.. glaub nich.. :gruebel: brauch ich das hier? Mit andern Variablen geht das, nur bei Strings hab ich Probs :(

:oops: mit ShareMem gehts :duck:


Alle Zeitangaben in WEZ +1. Es ist jetzt 05:35 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