MathGroup Archive 1999

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

Search the Archive

Re: Need Mathlink program Example

  • To: mathgroup at
  • Subject: [mg15969] Re: Need Mathlink program Example
  • From: Jens-Peer Kuska <kuska at>
  • Date: Fri, 19 Feb 1999 03:26:55 -0500
  • Organization: Universitaet Leipzig
  • References: <7ag17l$>
  • Sender: owner-wri-mathgroup at


the main problem is that a MathLink program spend its live
while waiting for a evaluation request form the Mathematica
kernel. A MS_Windows program spend its live while waiting for
event (messages) of the window system. To make a true GUI
application you must write a multi thread program. One thread
that is waiting for windows messages one thread that handle the
packets from Mathematicas kernel. The management of the threads 
is up to you and you may look to the output code that is produced
by mprep to see how the comunication is managed by MathLink.

The simplest thing is to create  a  second thread that calls 
MLMain() instead of calling MLMain() in the WinMain() function.

Hope that helps

Ruangyuth Inorn wrote:
> Hello all,
>                 Now I write my own mathlink program with MS visual C++,
> I can write it only in console application type, but I want to write my
> mathlink application in MFC application or windows application style, Is
> anyone had example of it? or anyone had any comment? I must use my
> application to display something that come from mathematica.
> Best Regards
> R. Inorn

  • Prev by Date: Re: Pure Functions in rules
  • Next by Date: Re: Plot[] problem (plnr) - help !!!
  • Previous by thread: Need Mathlink program Example
  • Next by thread: "extending" BinCounts, need for speed