Jump to content

  • Log In with Google      Sign In   
  • Create Account

Find Direct3D device


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 DarkRonin   Members   -  Reputation: 611

Like
0Likes
Like

Posted 07 January 2014 - 12:14 AM

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



Sponsor:

#2 DarkRonin   Members   -  Reputation: 611

Like
0Likes
Like

Posted 07 January 2014 - 09:37 PM

Can't be done, I take it?



#3 amrazek111   Members   -  Reputation: 692

Like
1Likes
Like

Posted 07 January 2014 - 11:12 PM

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"



#4 DarkRonin   Members   -  Reputation: 611

Like
0Likes
Like

Posted 08 January 2014 - 02:02 AM

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.

#5 DarkRonin   Members   -  Reputation: 611

Like
0Likes
Like

Posted 08 January 2014 - 02:12 AM

Actually, hooking looks interesting. I have never heard about that before. Just reading now.

Nice one :)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS