I import a C++ dll into a C# project and, on a x64 machine, on debug mode, PInvoke complains that managed signature does not match the unmanaged target signature.
C++:
void _Foo(signed long int x);
C#:
[DllImport("foo.dll", EntryPoint="_Foo"]
public static extern void Foo(int x)
Replacing int
in the C# code with IntPtr
or Int64
didn't solve the problem.
Any suggestions?