Tos on 26/7/2008 at 03:31
Glad to hear it worked for you!
The .exe was only altered enough to load the wrapper .dll at startup. All of the real changes are contained in the .dll. The .dll itself works by intercepting the game's calls to DirectPlay4 interfaces and then redirecting them to equivalent DirectPlay8 functions (if there is one, if not they're simply disabled).
Saam on 6/9/2008 at 17:18
Thanks for the info -- so you took the original shock.exe and replaced all instances of directplay4 calls to look at your .dll file instead?
Tos on 9/9/2008 at 06:59
The new .exe only loads the wrapper DLL. Once the DLL has started up, it redirects the game's CoCreateInstance import to my own code, and passes a new DirectPlay4 object to the real CoCreateInstance function that is created by my hook. This allows me to intercept all of the old DirectPlay 4 calls and redirect them as necessary to the newer ones (or simply drop them, if there's no equivalent or they're no longer necessary).
Tompelo on 12/9/2008 at 14:37
I don't like it when people leave my without any help!
I applied this fix and now that I try to host a game, it crashes to desktop. But if I try from another computer it hosts just fine, but I can't join because it gets stuck on Joining Game....
It says in the CMD window "Failed to enumerate hosts" And "Failed to create local player"
DDFix and all other possible thing there has been in the guides. HELP!
andwan0 on 27/4/2009 at 08:51
DirectPlay 4 couldn't work behind routers. The ports it uses are dynamic, even for server/hosts (where it should be static).
I guess writing a generic DirectPlay Hook/Wrapper is possible, to force the server/host ports to be fixed.
AustinBrock on 17/7/2010 at 17:19
Thanks for this. Myself and my Dad were able to play thanks to this.
We used to play XP to XP and that worked fine, but as I have upgraded to Windows 7, this solved our connectivity issue (via Hamachi).
Pity the save games don't work, but we can run through the game again.
Tos on 3/10/2010 at 18:39
Since several people have asked for this, I've gone ahead and uploaded the source files for the newer version of the DirectPlay 4 wrapper used in ThiefMP (
https://dl.dropboxusercontent.com/u/1556418/DP4Wrapper.zip) here.
This is 3 year old code that wasn't particularly well written to begin with, but it may at least give others who are attempting to convert DP4 games to DP8 an idea of how to go about it. Most of the important code is in the header file (the definition of the CDPWrapper class) and the CoCreateInstance hook that returns the wrapper object. Your hook will need to redirect calls from the game .exe to CoCreateInstance to your code. How you implement the DirectPlay 4 functions and convert their functionality to DP8 is up to you and the requirements there will vary from game to game.
If you base a wrapper for another game off this code I do at least ask that you give me credit for it somewhere.
C0rtexReaver on 6/10/2010 at 15:45
Quote Posted by andwan0
DirectPlay 4 couldn't work behind routers. The ports it uses are dynamic, even for server/hosts (where it should be static).
Really not true at all, it was just a case of knowing what to forward.
-CR
Rhiyo on 13/1/2013 at 18:13
Sorry to bring up an ancient thread, but is there anyway to implement this with 2.4?
adrianer on 19/1/2014 at 15:37
The link for the DirectPlay 4 to 8 wrapper source code does not work anymore :( Would it be possible to post the file somewhere else? My intention is to try make it work with The Settlers 3...