Hi Thomas,
You can't call a normal sub / function in an mbx from outside the mbx.
I'll suggest instead using
goMIPro.MBApplications("your.mbx").Do "XYZ"
to call
Sub RemoteMsgHandler
in your.mbx, and use a switch/case statement I mentioned there, using
CommandInfo(CMD_INFO_MSG) to retrieve the supplied parameter ("XYZ").
If you have multiple arguments, either encode them it the single Do
parameter, e.g. "12;345;ABC;True", or use several Global variables in
your.mbx and poke values to them using statements like these
goMIPro.MBApplications("your.mbx").MBGlobals("MyString").Value =
"abcdefg"
goMIPro.MBApplications("your.mbx").MBGlobals("MyInteger").Value = 12345
before calling Do / RemoteMsgHandler
As for functions, you may take a look at using Eval / RemoteQueryHandler
likewise.
HTH
Best regards / Med venlig hilsen
Lars V. Nielsen
--------------------------------------------------------
Hvenegaard A/S
http://www.hvenegaard.dk
----- Original Message -----
From: "Thomas Jund" <[EMAIL PROTECTED]>
To: "Lars V. Nielsen (Hvenegaard)" <[EMAIL PROTECTED]>
Sent: Tuesday, March 21, 2006 3:40 PM
Subject: Re: [MI-L] MapBasic 'Call' statement at runtime
Hi Lars
I don't want to define sub/functions in runtime, to be a more precise what
I actually want:
I want to write a module in MapBasic, which supports an application with a
number of sub/functions.
The application communicates with MapInfo as COM object. Now I want to
load the module on the
COM object with the command 'Run Application "myModule.MBX"'. Afterwards I
want to call the sub/functions
from the module with parameters through the COM object.
I hope that explains a bit more precisively what I want.
Best regards
Thomas
_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l