In my code, I want to create dinamically an istance to an assembly using :
System.Reflection.Assembly myDllAssembly = System.Reflection.Assembly.LoadFile(targetdllpath);
If my target dll is compiled as "AnyCPU", it works succesfully.
Now, I have to compile my target DLL as X86 because it must to use a COM object.
So, LoadFile method returns this error:
" is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)"
Can you help me?
User contributions licensed under CC BY-SA 3.0