dll was originally a bas to be included with some main code. The included code called InitializeCryptoBuffers and that worked OK.
On conversion to a dll I reckoned that calling InitializeCryptoBuffers from within a dll would not work, assuming that a dll was passive, so exported it and called it from a PB program. That worked OK.
On realizing FB dlls are not passive InitializeCryptoBuffers was returned to being just a Sub to be called from within the dll. That did not work.
I then put ' Print "Init" ' at the head of InitializeCryptoBuffers and the print worked. ' Print "Init" ' was moved line by line until a failure. Here is where the failure occurred.
Code: Select all
Print "Init" ' <--- Print did not happen and code just stops
' We don't need Work0 related objects again.
So, WaitForThreadpoolWorkCallbacks(Work0,FALSE) is the issue.
This does not make sense bearing in mind that Case 2 works.