Implementation of the INativeObject interface

 
 
 
Posted by:jonathan.beaubien@thq.com
Data created:9 March 2011

Hello...

I need to implement the INativeObject interface for a class, and I don't know how to do it. Can someone help ?

I'm not sure what the handle property should point to. And if it's pointing to the class itself, how to do that in C#.

public interface INativeObject
    {
        IntPtr Handle
        {
            get;
        }
    }

Thank you !

Hi Jonathan,

Why do you need to implement that interface? It is designed specifically for the wrapped .NET objects so that you can get to the native pointer of the wrapper. You shouldn't need to implement it yourself.

Marsel Khadiyev (Software Developer, EPHERE Inc.)