Using a method from C that's pointer dependent in C# -
i'm making wrapper c library. there method changes 2 ints user giving 2 int pointers method. if have void changenums(int* a, int* b) safe way access method in c#?
declare p/invoke this:
[dllimport(@"mydll.dll")] static extern void changenums(ref int a, ref int b); and call this:
int = 0; int b = 0; changenums(ref a, ref b);
Comments
Post a Comment