Find Direct3D device

Started by
3 comments, last by DividedByZero 10 years, 3 months ago

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 :)

Advertisement

Can't be done, I take it?

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"

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.
Actually, hooking looks interesting. I have never heard about that before. Just reading now.

Nice one :)

This topic is closed to new replies.

Advertisement