[Haskell] How to generate a dll?

kyra kyrab at mail.ru
Sat Sep 9 14:40:27 EDT 2006


Andreas Marth wrote:
> But if I call this in VBA it crashes Excel
> 
> VBA code:
> Dim helper As String
> Private Declare Function calculate Lib "Calculate.dll" (ByVal x as String) As String
> 
> Sub test ()
>   helper = calculate("Test")
>   Debug.Print helper
> End Sub
> 
> 
> All really basic.
> 
> Does anybody know why that does not work?
> 
> Thanks for all the answers up to now.
> 
> Andreas

The 'helper' must be BSTR.

Cheers,
Kyra


More information about the Haskell mailing list