I'm not certain what I'm doing incorrectly. The external function calls "succeed" (has the desired effect, returns data, etc.), but at the end of the handler, LO crashes.
Here's the BASIC macro I have.
- Code: Select all Expand viewCollapse view
Declare Function _myfunc Lib "path\to\my.dll" Alias "myfunc" (ByVal inst as Integer) as Integer
Function myFunc(ByVal x as Integer) as Integer
Dim rc as Integer
rc = _myfunc(x)
myFunc = rc
Am I doing this the proper way? Do I need to FreeLibrary at the end? It crashes with or without it. I tried putting it inside the function making the external call, without meaningful effect. Is there some other setup/teardown I need to do, in general? Are there limitations on event handlers?