public static extern string EndInit([MarshalAsAttribute(UnmanagedType.LPWStr)] string Rbd, char[] str, uint i)
You have declared the function to return a
string
, but it returns an
int
according to your description. So what you saw as
null
, was actually
zero
, which is the success code.