Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DLL and TStringList

Status
Not open for further replies.

RavenMaster

Programmer
Jun 30, 2002
1
BE
Hi,

i made a DLL with a number of routines. Among the variables is ( Var Lines : TStringList ).
I make the stringlist and pass it to the procedure, the procedure does it's thing then the Lines.Text gets the correct data. I've checked that. The problem now is this : i try to free the TStringList object like this : Lines.Free
This results in a invalid pointer operation address FFFFFF

I tryed the same with the a regular unit then it works, but when i use the DLL ( same routine ) then i get this error.

Any idea's what might be causing this ?
Since i can access the Text property correctly after processing by the routine in the DLL i assume that the pointer to the object is still correct,.. so what could it be ???

Help Plz.
Thx
 
if you handle with strings in DLLs use the sharemem unit in both, the DLL and the program (project.dpr).
Be shure sharemem is the first unit in the uses clause

program project1;

uses sharemem,forms...

and ...

library project2;

uses sharemem,...

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top