Jump to content
  • Advertisement
Sign in to follow this  

SlimDx, IDirect3DDevice9, and a Device

This topic is 2786 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to use the following call

HRESULT ResetDevice( [in] IDirect3DDevice9 *pDevice, [in] UINT resetToken ); http://msdn.microsoft.com/en-us/library/ms693525%28v=VS.85%29.aspx

I have create a
SlimDX.Direct3D9.Device object, and have it setup.

But, I dont know how to get the actual interface for it.
Trying to pass the device in as a marshalled.Interface gives me an error about the base object
SlimDx..ComObject is a NonCom Visible class.

I'm trying to use this in c#.

I converted the call above to be
[color=blue]void ResetDevice( [[color=#2b91af]In, [color=#2b91af]MarshalAs([color=#2b91af]UnmanagedType.Interface)] SlimDX.Direct3D9.[color=#2b91af]Device device, [color=blue]int resetToken );I tried
[color=blue]void ResetDevice( [color=green][In, MarshalAs(UnmanagedType.Interface)] IntPtr device, [color=blue]int resetToken );

And the passing the IntPtr to the object, that was a no go.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!