I have a method defined in an unmanaged DLL:
int foo(somestruct * vector, int size)
How can I call this method from C#? I've tried with MarshalAs Unmanaged.LPArray with no success. Am I required to use IntPtr and manually serialize into a List or similar.
I can't for the life of me find documentation on this on MSDN.
Essentially, I can't figure out how to complete the following snippet in my code:
[StructLayout(LayoutKind.Sequential), Serializable]
public struct somestruct
{
//Whatever.
};
[DLLImport("some.dll")]
public static extern int foo( ???? );
Thanks.