Dear Lists, Thanks to the quick help and examples provided by Trey Pattillo, I could solve the below described problem. In order to pass MapBasic variables to a Delphi 4 form, you have to use the "stdcall" option in the function declaration of the Delphi project. Example: function datadlg(sErisim : integer): integer;stdcall; Lots of thanks for the help. Thomas Thomas G�lden Diplom-Geologe Email (privat): [EMAIL PROTECTED] Email (dienstl.): [EMAIL PROTECTED] -----Urspr�ngliche Nachricht----- Von: Thomas G�lden [mailto:[EMAIL PROTECTED]] Gesendet am: Freitag, 9. April 1999 23:52 An: MapInfo-L (E-Mail); MI-Delphi (E-Mail) Betreff: 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]
