conversion from pointer

if i have a struct in c++ like

public struct s
{
}

and i have a function in DLL written in C that one of its parameter is
LPS (long pointer to s) what is the parameter type in c#

when i call that function i need to pass null to that parameter.
10x in advance
Avishay



Answer this question

conversion from pointer

  • israfel

    You would represent it in your P/Invoke signature as an IntPtr. For example:

    [DllImport("MyCPlusPlus.dll")]
    internal static extern void DoSomething(IntPtr ps);


  • conversion from pointer