Username and Password:

or Cancel
_______

Converting between System.IntPtr and wrapper objects

Sometimes it becomes necessary to pass or receive an IntPtr and be able to cast it to an interface to use it. IntPtr, in this case, would be the unmanaged pointer to your object.

  • To cast IntPtr to a Max.NET wrapper use IGlobal.CLASS_NAME.Marshal(...) method. For example:

    INotifyInfo notifyInfo = global.NotifyInfo.Marshal( pointer );

  • To get IntPtr from a Max.NET wrapper use the INativeObject.Handle property of the wrapper. For example:

    IntPtr pointer = notifyInfo.Handle;

-
_______