The following is a PInvoke block in C++ that I'm trying to convert to C#:
typedef PVOID JHANDLE ;
typedef UINT32 JRET ;
#define JEXPORT __declspec(dllimport) JRET
JEXPORT
JInitialize (
OUT JHANDLE* ppHandle,
IN PVOID context,
IN UINT32 flags
) ;
I tried the following call, but it threw a PInvokeStackImbalance exception saying that the signatures don't match:
[DllImport("jhi.dll")]
public static extern UInt32 JHI_Initialize(out IntPtr ppHandle, IntPtr context, UInt32 flags);
Obviously a pointer of a pointer is handled different, but I'm not exactly sure how it translates.