On my laptop, where I am developing a WPF application, everything works fine, debugs and runs the .exe application.
My application uses a native DLL, to solve the link problem, I add the DLL to the bin / debug (release) folder. I access it using DllImport as follows:
[DllImport("xptodll.dll", CallingConvention = CallingConvention.Cdecl)] public static extern int LDA_About();
The problem is that I try to run the .exe application on another PC when I need to access the DLL with which it crashes. I make a pen to log any unhandled exceptions and the following error appears:
Unable to load DLL 'xptodll.dll': the specified module could not be found. Exception from HRESULT: 0x8007007E)
The bin / debug directory contains xptodll.dll and application files: .exe, .application, .exe.config, .exe.manifest, .pdb.
Maybe this is important, xptodll.dll interacts with the hardware, but why not have the same behavior on both machines?
source share