View Full Version : How to make a wrapper from scratch
09-19-2004, 05:57 PM
I'm trying to make a wrapper base (and then the rest of it) from scratch. I looked around and couldn't find one on GD. Could someone please write up the basics, or point me in the right direction?
I posted this about 6 hours ago, but it dissappeared into the night. I'm still trying to decide if a Mod decided to delete the thread because I'm an idiot, or my computer is crapping up on me again.
09-19-2004, 07:45 PM
a wrapper for what exactly?
09-19-2004, 08:36 PM
Well, this practicular wrapper would be for directinput, but I'm more interested in the process then simpily having the wrapper. If I didnt care about learning, id go somewhere like mpc or uc forum. If I actually learn how, i can avoid being pinned down by others not having done it, or asking others to do it for me.
09-22-2004, 05:41 PM
Well, that above post was really stupid...I cant help being an idiot sometimes :) ...but its kinda clear now that either I'm too noobish in this subject to even bother, or its just too inconvient to write a tutorial...so is there somewhere you guys can point me twoards?
09-22-2004, 05:44 PM
well, this is generally how you make a wrapper.
1) Find the original dll you want to hack
2) Read the dll exports the orginal dll creates (for d3d9.dll its Direct3DCreate9 [other dlls can have more exports])
3) Your new wrapper dll will have to have the exact same exports as the original one
4) Make your wrapper load the original dll
5) With the exported function, you do your hacked code, then call the original function from the original dll
6) You place the wrapper dll into the same directory as the game .exe
09-22-2004, 07:16 PM
Wow. thanks alot. Amazingally, I got most of that. I might have something to show for it sometime soon.
09-25-2004, 09:01 PM
<stupid question alert>
Actually...Since I'm already using a d3d wrapper for this program...could I just extend it to include the directinput functions? That would simplify things enormousely.
09-25-2004, 09:08 PM
no, although DirectInput and Direct3D are similar (the way they do interfaces) their is no way to make a wrapper wrap 2 dll. (well, you could, but it would really defeat the purpose of it being a wrapper)
What you need is a hook of some sort, you can download my D3D Starter kit from here (http://zox.game-deception.com/downloads), and then add in DirectInput interfaces the same way that D3D is in it.
09-26-2004, 12:37 AM
OK thank you.
Powered by vBulletin® Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.