Thanks very much to all who's responded on my question. Bellow is =
suggested solutions. I used the suggestion from Roman Kovin due to fact =
that another one didn't solve my problem. Even that, I think, they =
should be very useful for similar problems.
Once more thanks very much to all.
Best Regards Stefan.


*************************************************************************=
*************************************************
To run a mbx, or any other program use Run Application [a mbx or wor]
To help with paths with spaces use a variable and drop quotes around it

DIM RunApp as string
RunApp=3DChr$(34)+"c:\folder\app.mbx"+Chr$(34)
Run Application RunApp

for programs use Run Program RunApp
*************************************************************************=
*************************************************
Since you must be calling the dll from a mbx, why don't you just call =
mbx2
from the first mbx once you return from the dll?
Like this in the main mbx:
> start of mbx
........
a =3D mydllfunction(6)
run application ("next.mbx")
> end of mbx

*************************************************************************=
*************************************************
I haven't used DDE before, however I would recommend making an OLE
connection to the running instance of MapInfo and executing the MBX in =
that.
-------------------------------------------------------
Procedure RunMBX;
Const
   MYMBX =3D 'C:\MyApps\MyMBXapp.MBX';
Var
   oMI : Variant;
Begin
   try
      oMI :=3D getActiveOLEobject('MapInfo.Application');
      oMI.Do('Run Application "' + MYMBX + '"');
   except
      ShowMessage('MapInfo is not running.');
   End;
End;
*************************************************************************=
*************************************************
Hi, try this code:
// from Delphi
begin
...... // you base code
.......
    mi_cmd:=3D'Run Application <your mbx>';
    SendMapInfoNote(mi_cmd);
end;
procedure SendMapInfoNote(note:string);
var dde_conv:TDDEClientConv;
    arr:array[0..511] of Char;
begin
   dde_conv:=3DTDDEClientConv.Create(Application);
   try
     StrPCopy(arr,note);
     dde_conv.SetLink('MapInfo','<your main mbx>');
     dde_conv.ExecuteMacro(arr,True);
     dde_conv.CloseLink;
   finally
     dde_conv.Destroy;
   end;
end;
// from MapBasic (your main mbx)
Sub RemoteMsgHandler
Dim  cmd   As String

 OnError goto err_run
 cmd=3DCommandInfo(CMD_INFO_MSG)
  Run Command cmd
ok_exit:
 Exit Sub
err_run:
 Note Error$()
 Resume ok_exit
End Sub

*************************************************************************=
*************************************************



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to