Most probably should the original example be adapted for Delphi 3 or 4 (it
was written for Delphi 1.0). I suspect stdcall is missing.
Hereafter a few updated examples (Delphi 3.0 project + MapBasic).
<<EXAMPLE1.MB>> <<EXAMPLE1.DPR>>
Further useful examples can be found on the MapInfo-L FTP site (they were
used to derive the above ones).
Good luck.
Pierre Henrotay
Siemens Nixdorf Information Systems
Major Projects
Tel.: +32 81 559 687
Fax: +32 81 559 658
Mail (office): [EMAIL PROTECTED]
Mail (home): [EMAIL PROTECTED]
> -----Original Message-----
> From: Thomas G�lden [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, April 09, 1999 11:52 PM
> To: MapInfo-L (E-Mail); MI-Delphi (E-Mail)
> Subject: MI MapBasic & Delphi
>
> Dear MapInfo & Delphi experts
>
> I want to pass a variable from MapBasic to a form in Delphi so that its
> value is displayed in a TLabel component. The variable can be either
> integer
> or string.
>
> At the end the form will be a data entry dialog and the variable is used
> to
> select the data.
>
> I followed the example from Pierre Henrotay
> (http://www.inmap.co.nz/mi_faq/1102.html) to no avail.
>
> I use a string parameter from MapBasic, which is declared as PChar in the
> corresponding Delphi function. The results are just invalid characters
> (wild
> pointer).
>
> Passing a MapBasic integer to the form displays a wrong value. However the
> functions return value (an integer) is passed back correctly to MapBasic.
>
> Well, for experienced programmers this is possible a simple exercise, but
> I
> tried several combinations of datatypes without success.
>
> If anybody can show how to declare the function and how to specify the
> datatypes, I would be very grateful.
>
> Thanks in advance.
>
> (P.S.: I am using MapBasic 4.5 and Delphi 4.0)
>
> Thomas G�lden
> Diplom-Geologe
>
> Email (privat): [EMAIL PROTECTED]
> Email (dienstl.): [EMAIL PROTECTED]
>
>
>
> ----------------------------------------------------------------------
> To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
EXAMPLE1.MB
EXAMPLE1.DPR