Making plugin DLL's with JUCE

Hi there, first of all I have to say I’m pretty new to DLL’s, this is my first real attempt to incorperate them into a project but I have had basic stuff working before putting Juce in the mix.

My project I’ve been working on should support DLL’s as plugins but I’m having a few problems getting run time loaded DLL’s to work with Juce. Basically I’m getting the same problem as descibed in this thread.

http://www.rawmaterialsoftware.com/juceforum/viewtopic.php?t=515&postdays=0&postorder=asc&highlight=dll&start=15

[quote]Jules
Thu Dec 08, 2005 6:22 pm
There are two timer threads - one in the exe, one in the dll, and the first one gets deleted ok, but the second one is forcibly killed by something else - probably the c runtime library or win32 - so that when the juce thread stuff tries to kill it, it gets confused because the thread has already gone without having shut down properly.

I need to look into a bit more to think of a good solution…[/quote]

The program triggers the jassert “very bad karma if this point is reached, as there are bound to be locks and events left in silly states when a thread is killed by force…”

I couldn’t find if this was ever fixed. Anyone get something like this to work? If I need to I can post 2 small projects (DLL & DLL loader) that show the problem.

Thanks,

Matt.

[edit: fixed quote]

Not sure - is it just that you’re not calling the juce_shutdown functions in your DLL’s Detach callback? Check out the VST plugin code - that’s a DLL, so might be useful for hints.

I seem to have got it working now, not too sure what I changed but it’s all good. Sorry for the false alarm, since I was getting the same error as I found in a previous post I assumed it was the same thing. You know what they say about assumption… :wink:

Matt