I have written a PB DLL to replace presumably slower code in a VB image processing application. When the DLL is inserted in the VB program it produces exactly the same result as the native VB code and the image processing program works fine. The problem is that once I close the window that calls the DLL, any attempt to open that window again on another image causes VB to crash immediately. The behavior is consistant. The DLL always works perfectly on the first access and crashes on the second. Occasionally there will be an error message preceeding the crash announcing a "VB6 Application Error" in which an instruction at O... referenced memory at o... and that the memory could not be written.
The DLL is written along the lines of an earlier thread http://www.powerbasic.com/support/pb...ad.php?t=38858 and the earlier DLL had no problem with repeated access. The current "single-use DLL" contains only numerical calculations on absolute arrays. It consists of one function and two subs and has no DLLMAIN.
From the behavior it appears that I have neglected to do something necessary in PB. Any suggestions for something to try?
Ken German
The DLL is written along the lines of an earlier thread http://www.powerbasic.com/support/pb...ad.php?t=38858 and the earlier DLL had no problem with repeated access. The current "single-use DLL" contains only numerical calculations on absolute arrays. It consists of one function and two subs and has no DLLMAIN.
From the behavior it appears that I have neglected to do something necessary in PB. Any suggestions for something to try?
Ken German
Comment