# Demo and host extras don't work with Juce DLL

**URL:** <https://forum.juce.com/t/demo-and-host-extras-dont-work-with-juce-dll/3938>\
**Category:** Windows\
**Created:** [May 19, 2009, 12:04am UTC](https://forum.juce.com/t/demo-and-host-extras-dont-work-with-juce-dll/3938 "2009-05-19T00:04:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrblasto](https://avatars.discourse-cdn.com/v4/letter/m/5f9b8f/32.png) [@mrblasto](https://forum.juce.com/u/mrblasto)\
**Post date:** [May 19, 2009, 12:04am UTC](https://forum.juce.com/t/demo-and-host-extras-dont-work-with-juce-dll/3938/1 "2009-05-19T00:04:08Z")

</div>

I’m using version 718 and have built Juce using the Debug DLL project configuration. I’ve defined JUCE\_DLL right before including juce.dll in the includes.h file of both projects. The program runs till it gets to the line

`commandManager->registerAllCommandsForTarget (this);` in the initialise function of the application class. It then pops up a window:

[quote]Windows has triggered a breakpoint in PluginHost.exe.

This may be due to a corruption of the heap, which indicates a bug in PluginHost.exe or any of the DLLs it has loaded.

This may also be due to the user pressing F12 while PluginHost.exe has focus.

The output window may have more diagnostic information.[/quote]

A similiar popup occurs at the same line in the host starter code in the juce demo app as well. The example code (hello window) does work linked to a DLL version of Juce. All extras work if linked to a static library or if they use the amalgamated version of Juce.

I noticed that in juce\_memory.h, JUCE\_DLL was not defined. I defined it, but that did not change behaviors.

I seem to recall an earlier post to the forums that talked about problems with DLL memory allocations, but I could not find it through the search. Any pointers to a solution would be greatly appreciated.  
[/code]

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [May 19, 2009, 4:21pm UTC](https://forum.juce.com/t/demo-and-host-extras-dont-work-with-juce-dll/3938/2 "2009-05-19T16:21:41Z")

</div>

No ideas spring to mind about what this could be, though it’s probably something simple. Maybe I’ve missed out adding the juce\_UseDebuggingNewOperator macro to one of the more recent classes…
