[Haskell] How to generate a dll?

Anatoly Zaretsky anatoly.zaretsky at gmail.com
Thu Sep 7 11:56:08 EDT 2006

On 9/7/06, Andreas Marth <Andreas-Haskell at gmx.net> 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) {
      return TRUE;

> If I tried to return a String (marshalled to CString) the dll just plain
> crashed when called.
How exactly is it marshalled?


More information about the Haskell mailing list