Re: [Haskell] How to generate a dll?

2006-09-09 Thread Andreas Marth
Hi! Hi, Andreas! Try adding these lines to your DllMain: if (reason == DLL_PROCESS_DETACH) { shutdownHaskell(); return TRUE; } This worked great. (At least with Excel. I didn't test it with the VB-Project yet.) If I tried to return a String (marshalled to CString)

Re: [Haskell] How to generate a dll?

2006-09-07 Thread Michael Marte
Andreas, one more pointer: http://haskell.org/haskellwiki/GHC:FAQ#GHC_on_Windows Michael Andreas Marth wrote: Hallo! I want to make my Haskell program usable from Visual Basic. What is the way to go? (I tried the way the user guide for ghc 6.4.2 describes but the resulting dll was not

Re: [Haskell] How to generate a dll?

2006-09-07 Thread Andreas Marth
From: Michael Marte [EMAIL PROTECTED] To: Andreas Marth [EMAIL PROTECTED] Cc: haskell@haskell.org Sent: Wednesday, September 06, 2006 6:04 PM Subject: Re: [Haskell] How to generate a dll? Andreas, I am using a DLL generated by ghc 6.4.2 in combination with Visual C++ 2005. Some useful links

Re: [Haskell] How to generate a dll?

2006-09-07 Thread Anatoly Zaretsky
On 9/7/06, Andreas Marth [EMAIL PROTECTED] wrote: I meant that the dll crashed Excel wenn I stopped the debugging mode and also if I used it in a VB-projekt it crahed that when stopped. Hi, Andreas! Try adding these lines to your DllMain: if (reason == DLL_PROCESS_DETACH) {

Re: [Haskell] How to generate a dll?

2006-09-06 Thread Michael Marte
Andreas, I am using a DLL generated by ghc 6.4.2 in combination with Visual C++ 2005. Some useful links: http://www.willus.com/mingw/yongweiwu_stdcall.html http://en.wikipedia.org/wiki/Name_mangling http://www.mingw.org/mingwfaq.shtml#faq-msvcdll What do you mean by the resulting dll was

[Haskell] How to generate a dll?

2006-09-05 Thread Andreas Marth
Hallo! I want to make my Haskell program usable from Visual Basic. What is the way to go? (I tried the way the user guide for ghc 6.4.2 describes but the resulting dll was not stable.) While I don't have any clues about language interoperation I guess it is a task that is done many times before.