Answer the question
In order to leave comments, you need to log in
Unable to load DLL (Module could not be found HRESULT: 0x8007007E)?
I'm trying to import my dll written in c++.
[DllImport(@"..\..\baselib\Release\baselib.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern int BT7274(int a, int b);
static void Main(string[] args)
{
BT7274(1, 2);
}
System.DllNotFoundException: 'Unable to load DLL 'baselib.dll' or one of its dependencies:
The specified module could not be found. (0x8007007E)'
Answer the question
In order to leave comments, you need to log in
You can't seem to use relative paths. Just write baselib.dll and put it next to the executable
or one of its dependencies
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question