It really depends on what the parameter is used for. It seems to me that
data
is a
byte
buffer, so your P/Invoke signature should be:
public static extern int SomeFunction(int cmd, int param, out byte[] data);
You may use
ref
instead of
out
, if the method expects you to pass an initialized array.