Considering your linker problems: Have you added shared.lib to the linker input for your project?
Note that your DLL name should start with "foo_" or foobar2000 will not even attempt to load it as a component.
Some remarks about the code:
1) The SDK contains utilities to convert between wide and UTF-8 strings. Look for pfc::stringcvt. Foobar2000 uses UTF-8 internally. Your helper functions depend on the current locale which is usually not UTF-8. There is also string_utf8_from_window which comes in handy for EDIT controls.
2) Titleformatting is quite easier than you think. The metadb_handle::format_title method does any required locking by itself and also takes care of providing information about the track. So instead of this: curTrack->metadb_lock();
file_info_impl info;
curTrack->get_info(info);
pfc::string8 newDsp;
curTrack->format_title(&titleformat_hook_impl_file_info(curTrack->get_location(), &info), newDsp, compiledTitleformat, 0);
curTrack->metadb_unlock();
you can simple do that: pfc::string8 newDsp;
curTrack->format_title(NULL, newDsp, compiledTitleformat, NULL);
3) This looks strange to me:currentChain=chainsMap->operator [](newDsp);
I'd just use:currentChain = chainsMap[newDsp];
Of course that requires changing the definition of chainsMap to pfc::map_t<pfc::string8, dsp_chain_config_impl *, pfc::string::comparatorCaseInsensitive> chainsMap;
It will be automatically created and destroyed in the constructor/destructor of the dsp_sample class. If you use an appropriate smart pointer class to wrap your dsp_chain_config_impl instances, you do not event need to explicitly free all the entries in the dsp_sample destructor.
4) You allocate a dsp_chunk_list_impl using operator new, but deallocate if with free() so the destructor will not run. Use operator delete instead. Or even better: Use a local variable or a smart pointer which will automatically free your list when the variable goes out of scope.
5) Your g_get_default_preset method leaks memory. It never deletes its chainsMap.
6) You are leaking a dsp_manager instance. You create one via operator new in the constructors of dsp_sample, but never delete it as far as I can see. Better to declare it as:dsp_manager manager;
7) You use newTrack as a flag. Since C++ has a bool type, I recommend using that to make the code easier to read.