1 year ago
#353747
Elisa96
Problems with importing native C .dll in C# project
I'm trying to import a native DLL (written in C) in my C# project in visual studio. I've tried several ways but still get the same expeption (System.DllNotFoundException).
I've tried to import as follows:
#region P/Invoke
[DllImport("GetRotate.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr GetRotoTranslateImage([MarshalAsAttribute(UnmanagedType.LPStr)] String path, int x, int y, int translationX, int translationY, float rotAngle);
#endregion // P/Invoke
What's wrong? Why it is not able to find the dll?
Thanks in advance.
c#
visual-studio
dllimport
0 Answers
Your Answer