Jump to content
  • Advertisement
Sign in to follow this  
netham45

DirectX Proxy Dll Talking to VB?

This topic is 2908 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've successfully gotten a DirectX Proxy DLL loaded by Team Fortress 2. My goal with the dll is to overlay chat from IRC and AIM.

I have an IRC Client I wrote in VB that gets all the lines and assembles them into a bitmap object, but I am relatively new to C++(read as: I've never touched it before this), and I cannot think of a method that I would use to get the information from my app to the proxy dll.

Edit: Would DDE be a viable route?

Also, just so you know, I know the proxy dll works because I can clear parts of the screen. I'm also using VS 2008 if it matters.

Share this post


Link to post
Share on other sites
Advertisement
What kind of DLL is this, exactly?

Can't you take your existing VB app and do a DllImport (or VB equivalent), enumerate the functions in the DLL you want access to, and go from there?

Share this post


Link to post
Share on other sites
It's a D3D9 proxy dll.

Basically, it's exporting all the D3D9 functions, and when they get called, it calls my code, then the real D3D9 functions.

I could load it in VB, but it would do nothing, because I'm trying to talk to the instance of it that's loaded by a game.

Share this post


Link to post
Share on other sites
Use C++/CLI for the proxy DLL and use it to load and execute the VB assembly.

BTW: Doing such things in an online game will most likely get you banned. They usually don't care if the code you injected is harmless.

Share this post


Link to post
Share on other sites
hrm, I didn't really take anti-cheat methods into consideration...

But, doesn't FRAPS work in almost the same way?

Share this post


Link to post
Share on other sites
Quote:
Original post by netham45
It's a D3D9 proxy dll.

Basically, it's exporting all the D3D9 functions, and when they get called, it calls my code, then the real D3D9 functions.

I could load it in VB, but it would do nothing, because I'm trying to talk to the instance of it that's loaded by a game.


Ah, I see. Have you taken a look at this article?

[C++] Direct3D hooking sample

What I would do is take this guy's code and replace the part where he draws the colored thing at the top-left with something that renders your BMP.

A hackish way to do it would be to save the BMP out to a file in VB (first load your VB program in the DLL). Then load the BMP into your DLL and do the rendering there whenever the BMP file changes. It requires your DLL to be constantly watching the file, but it may be an easy way out.

Also, although DirectDraw is deprecated, a sure-fire way not to be caught by the anti-hack stuff is to use that instead to draw the overlays. You can even do that from inside VB, eliminating the need for DLL stuff altogether. Here's something by the same guy:

[C++] Overlay sample

Let me know if that helps.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!