Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

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

Search the Archive

Re: Need Mathlink program Example

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15969] Re: Need Mathlink program Example
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 19 Feb 1999 03:26:55 -0500
  • Organization: Universitaet Leipzig
  • References: <7ag17l$ae7@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

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
  Jens


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