Date: Thu, 23 Apr 1998 13:27:51 +0300 (IDT) From: Eli Zaretskii To: a DOT hofkamp AT wtb DOT tue DOT nl cc: "altaf.aali" , djgpp AT delorie DOT com Subject: Re: Interfacing to a MS-Windows application: How ? In-Reply-To: <199804230810.KAA06685@se-46.wpa.wtb.tue.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Thu, 23 Apr 1998 hat AT se-46 DOT wpa DOT wtb DOT tue DOT nl wrote: > something like 'system("simulation.exe")' will probably work here > as suggested by Eli Zaretskii (thanks !) Not ``system("simulation")'', use ``system("start simulation")''. The latter won't stop Excel in its tracks until the simulation returns. I suppose there is a way to run external programs from Excel, and you should use that way to run the DJGPP program via "start". This will run it in a separat DOS box, while Excel is free for whatever else you need it. When the simulation is over, just load the file of results into Excel. > 2) The DJGPP simulation-program needs a MS-win app to do some > calculations for it. For example, we need to lookup a value from a large > MS-Access data-base (or from an Excel spread-sheet). > > How to do this is not clear to me. Can I use Libwin for this purpose ? Libwin will not help, AFAIK, since it does not (and cannot) make a DJGPP program compatible with Windows apps. Libwin just lets you access some Windows features from a DJGPP program. You can read the registry, interface to the clipboard, set your DOS box title, etc. This all doesn't help you a bit top communicate with a Windows app; since you said that the results are huge, the clipboard won't help since access to it from DJGPP programs is limited to about 600KB (you need a buffer in lower memory to pass data to and from the clipboard). The easiest way to accomplish this second task is to make the programs communicate through disk files. Then you have the DJGPP program run the Windows application, and then read the results from a file. Ugly, but it should work.