Print warning explicit COM init was necessary

So far only PSPaudioware InfiniStrip needed this. but it may be a good
idea to make this visible since it's probably an issue with the
plugin (even if most Windows hosts will have COM initialized).
This commit is contained in:
Robbert van der Helm
2021-04-26 00:41:16 +02:00
parent 68c846324c
commit a42ee0400f
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -80,6 +80,12 @@ Vst2Bridge::Vst2Bridge(MainContext& main_context,
if (!plugin_handle) {
OleInitialize(nullptr);
plugin_handle.reset(LoadLibrary(plugin_dll_path.c_str()));
if (plugin_handle) {
std::cerr << "WARNING: '" << plugin_dll_path << "'" << std::endl;
std::cerr << " could only load after we manually"
<< std::endl;
std::cerr << " initialized the COM library." << std::endl;
}
}
if (!plugin_handle) {
+6
View File
@@ -107,6 +107,12 @@ Vst3Bridge::Vst3Bridge(MainContext& main_context,
if (!module) {
OleInitialize(nullptr);
module = VST3::Hosting::Win32Module::create(plugin_dll_path, error);
if (module) {
std::cerr << "WARNING: '" << plugin_dll_path << "'" << std::endl;
std::cerr << " could only load after we manually"
<< std::endl;
std::cerr << " initialized the COM library." << std::endl;
}
}
if (!module) {