Search code examples
c#interopreferenceunmanagedmanaged

cast an IntPtr unmanaged class reference to something meaningful


My IntPtr references an unmanaged DEVMODE object instance. How do I cast it to something meaningful so I could actually work in my managed code with it?


Solution

  • I used the DEVMODE structure from pinvoke.net. http://www.pinvoke.net/default.aspx/Structures/DEVMODE.html