MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: MathLink and Win95



> I'm not expecting much luck here, but does anyone know anything about
> using MathLink with Visual Basic, COM or ActiveX?
> 
> Thanks, Scott Morrison
> scott@morrison.fl.net.au

There is an example of using MathLink with Visual Basic in the MathLink
Developer's Kit.  If you've got the 3.0 Mathematica version, then look
in the following subdirectory of the Mathematica directory:

AddOns\MathLink\DevelopersKits\Windows\UnsupportedGoodies\vbfe32

Unfortunately, there is no real documentation on using Mathematica with
Visual Basic, but the example in that directory does provide a good
starting point.

While the Mathematica front end provides limited support as an OLE
client, you'll probably find the level of support not terribly useful
for development.  It does not currently support any server or
automation technologies, and MathLink has no awareness of COM at all.

Of course, none of this means you can't access these technologies
through MathLink.  As with virtually any technology, accessing COM
through MathLink simply requires that you write a glue library speaks
COM on one side and MathLink on the other.  Doing this requires a fair
knowledge of both technologies, and may be simple or complicated,
depending upon what kinds of things you expect the glue library to do
for you.

For example, it would be a trivial matter for an experienced COM
programmer to simply create a MathLink COM interface.  Just create an
interface which mirrors the MathLink API and voilah...you no longer
have to link to the MathLink library...you just use your COM interface.
Exploiting that COM interface for something useful, though, such as
attempting to control the FE to make it act like an ActiveX control,
may require somewhat more careful work and planning, and a knowledge of
more than just MathLink (e.g., how to use front end tokens and
packets). You may decide to make your glue library contain this
knowledge, or your may decide to make your glue library very dumb (so
it just contains the MathLink API) and rely on the counterpart
technology to intelligently manipulate MathLink programs.

Since you asked a very general question, I gave a very general answer.
If you need more specific information, we can exchange email privately
about what it is you're doing.

Sincerely,

John Fultz
jfultz@wolfram.com
Front End Group
Wolfram Research, Inc.



  • Prev by Date: Re: Re: Assignment to a block inside a matrix
  • Next by Date: MD5 implementation?
  • Prev by thread: MathLink and Win95
  • Next by thread: Re: MathLink and Win95