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