'Using a DLL function in C# that requires a pointer as argument, am I declaring this properly?
I am developing an application with C# and have to call an external function from a DLL. This function requires a pointer to an integer array as an argument. The DLL documentation states that the integer array must have >= 4kb space allocation. I know C# steers away from pointers but I'm pretty sure I don't have a choice here, no? How do I allocate a pointer to an integer array and guarantee it is >= 4kb in size, in C#?
I have:
public readonly unsafe int*[] dataBuffer = new int*[1000];
But I am not sure if this is correct.
Method signature is
int DataRec(void* buf);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
