Search code examples
c#c++pinvokedllimport

C++ to C#: What is equivalent of array of byte pointer with 3 element


I have this code in C++

BYTE * apData[3]

How to convert it to C# ? ( I'm using DllImport )


Solution

  • Just use byte[]:

    [DllImport EntryPoint="myfunc"]
    public extern static void MyFunc(byte[]);
    
    byte[] apData = new byte[3];
    MyFunc(apData);