Advertisement Jump to content
Sign in to follow this  
DividedByZero

Find Direct3D device

This topic is 1841 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

Hi guys,

 

If all I have is a window handle, is there any way that I can determine what the Direct3DDevice is that is rendering on it?

 

Thanks in advance :)

Share this post


Link to post
Share on other sites
Advertisement

Sure it can be done.  I assume you don't have control of the process that owns that handle, so what you'll be needing is 1) a strategy to get your own code running inside that process and 2) a strategy to find the device pointer once you're inside.

 

The simplest solution is a proxy DLL, which would cover both cases nicely.  Some helpful articles could be found by googling "DirectX hook proxy dll"

Share this post


Link to post
Share on other sites
Thanks for the reply.

I have no problems getting a dll into the application. But the problem is all you can get using their limited API (GameMaker Studio), is the window handle, and GML will only let you pass strings or doubles to the dll (and only doubles as return code).

So, I am really limited only to getting HWND from the application, unfortunately. There is nothing in GML itself with regards to getting the D3DDevice.

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!