IntPtr vs ref C#
<p>i have to import unmanaged dll into my C# application,
I want to know what is the diferent between IntPtr and ref, and what you recommnded me to use and why?
Note that both ways are working to me.
For example:</p>

<pre><code>[DllImport("mydll.dll", CallingConvention=CallingConvention.Cdecl)]
static extern Result Init(IntPtr versionInfo);

 [DllImport("mydll.dll", CallingConvention=CallingConvention.Cdecl)]
 public static extern Result Init(ref Version versionInfo);
</code></pre>
