Fw: Re[2]: [fpc-pascal] how to pass PChar (or any pointer) from Delphi to FPC ?

Пётр Косаревский ppkk at mail.ru
Tue Apr 4 11:34:14 CEST 2006

This message was by an error sent to Jonas Maebe privately.
Addendum1: implementing DDE, OLE etcetera is not that easy in this case, because requires dummy window not only under FPC, but even under Delphi (modifying message loops of control elements like the main window of the main form in Delphi is not that easy too).
Addendum2: there was good post on message loops here http://lists.freepascal.org/lists/fpc-pascal/2002-August/003764.html

> > On 4 apr 2006, at 10:48, Пётр Косаревский wrote:
> > > I can transfer information from Delphi program to FPC, but they  
> > > have different memory managers or something, so pointers are the  
> > > same numbers, but different physical addressed.
> > How do you transfer these pointers and what are you trying to  
> > accomplish? You generally cannot transfer pointers from one running  
> > program to another. It may work by accident in some cases, but it is  
> > not something you can rely on (even if both programs are compiled by  
> > the same version of the same compiler on the same OS and are running  
> > on the same machine).
> > Jonas
> I transfer them as numbers. I work under win32. I transfer them as LParam-s with PostMessage() WinAPI function. Numbers are transferred correctly (I checked it with .messagebox/writeln).
> I try to have access to the same physical memory (I want to have common read-write variable).

More information about the fpc-pascal mailing list