Q: I am using Reflection to load assemblies in a folder, and with PDFNet I get the following error.
Message=The C++ module failed to load while attempting to initialize the default appdomain.
Any ideas what is happening?
Because PDFNet for .Net contains unmanaged code, it has additional requirements when crossing appdomains (since managed and unmanaged are in different memory regions).
If you are using a security package with a class implementing IPrincipal, then you must inherit from the MarshalByRefObject class.
For more information see the following.