Hi all,
I need to call an Haskell module from Excel and as an exercise I started to play with the example given in GHC documentation:
http://www.haskell.org/ghc/dist/current/docs/users_guide/win32-dlls.html
I
could build the DLL without problem but encountered a problem when
using it. I created an Excel document using the dll. If I open the
Excel document, do something that will trigger a function call in the
DLL, then Excel will crash on Exit. On the opposite if I open the same
document and changes cells not related to the function the program
closes properly. I does not crash directly on the function call but
later, just when I close Excel.
As it crashes when closing Excel I suspect something is wrong
when unloading the dll. I modified the dllMain.c code to handle the
DLL_PROCESS_DETACH event but it doesn't solve the problem.