title: C# - How To Convert Object To IntPtr And Back?
body: <p>I want to pass an object from managed code to a WinApi function as <code>IntPtr</code>. It will pass this object back to my callback function in managed code as <code>IntPtr</code>. It's not a structure, it's an instance of a class.</p>
  
  <p><strong>How do I convert <code>object</code> to <code>IntPtr</code> and back ?</strong></p>