Page 1 of 1

dll not found when running C++ DocumentLoader example

PostPosted: Thu Jul 02, 2020 5:44 am
by spiffer00
I'm new to OpenOffice development and trying to run the C++ "DocumentLoader" example with Visual Studio 2017 on Windows 8.1.

When running and the code gets to the statement :
Code: Select all   Expand viewCollapse view
Reference< XComponentContext > xComponentContext(::cppu::defaultBootstrap_InitialComponentContext());

an exception is thrown with the message:
loading component library failed: file:///C:/windows/SYSTEM32/

I copied the missing dll into the indicated folder but it's still reported not found at runtime. I've tried registering the dll from the \system32 folder mentioned using the regsvr32.exe tool and it's reported not found in this exercise, too, so this is not a Visual Studio issue. I've copied the dll into the \SysWOW64 folder to experiment with regsvr32.exe and this time it's found and loaded. So the idea I have now is to run the example with the dll in the \SysWOW64 folder. But how do I change configuration so my code can look for the dll in \SysWOW64 instead of \system32?