The only code I am using of yours is the "DynamicDLL module file" and the "JukePlugin class module" file...... and I am only interacting with the following routines within your JukePluin class module file:
1) Initialze()
2) Configure() <-- I have logic in my code to call this routine, but it is not being called during this crash
3) Shutdown()
4) Command()
5) routines to "get" plugin name, author, version and description
What this means is that I did not use any of the routines in the "Project1.vbp" project located in the "Form1" logic at all and I am not calling any of the individual event routines you have defined in the "JukePlugin class module" When I want to send a command, I simply call the "Command" routine directly. Anyway, in my code, it still crashes when y application exits, so it must be related to either Initialize, Shutdown or Commands routines somehow. I am not even using a 200ms timer in my code to get information from the plugin either, so I really doubt it has anything to do with a Timer stuff.
I also verified the Initialize(), Shutdown() and Command() routines from the "JukePlugin class module" v10b14 matched exactly with the latest "JukePlugin class module" v1.0 ...... so this is why I believe this problem existed earlier than v1.0 Basically, it seems the code I am "currently" using from your "JukePlugin class module" v1.0 release is the same code I tested with successfully from your v10b14 release.
I then decided to play around with your "Project1.vbp" project:I tried to comment out the "FreeLibrary hDll" line in the ShutDown routine but that did not solve the problem ... it still crashed. I tried commenting out the call to CallFuncPtr in the ShutDown routine and it still crashed.
Here is the weird part ........ I commented out every line of the Shutdown routine and the crash stopped. I then uncommented selected lines of the ShutDown routine back in one at a time and tested whether it crashed each time and it never did crash any more. I got to the point of "uncommenting" all lines within the ShutDown routine and the crash can not be reproduced anymore. This just means the routine is now overwriting memory somewhere else and it is just not crashing the "Project1.vbp" code anymore. Bad thing is, I can not reproduce the problem either using "Project1.vbp".
** I am at work now and can not do anything until later tonight ......
