Hey, I'm the author of WowLoader.
It was suggested to me that I might find people interested in the source here.
As I've decided to move on, there's still a few things left undone (ignoring the various crashes).
First off, there's the activation issue.
The reason activate.exe isn't working is because it dynamically loads a DLL which cannot be loaded due to unresolved imports.
Unresolved imports is handled in the loader during the process creation stage, by creating the process suspended, the loader has a chance to resolve missing imports, before the OS attempts to resolve them.
The specific class which handles this is named CAppPatch.
Obviously this approach doesn't work with dynamically loaded DLL's.
What's needed is to hook the LoadLibrary(Ex)(A/W) call used and load the DLL manually.
You can use the flag DONT_RESOLVE_DLL_REFERENCES to get the OS to map the DLL properly.
Then you need to resolve the imports of the DLL yourself and call the entry point at appropiate times.
Not sure if there's more work to be done after that, in theory that should be enough.
Second, there's the dedicated server.
The dedicated runs as a service process, which means the loader doesn't have any control of it's creation.
What's needed here is to adapt the loader to work as a proxy service, which can then be registered in place of the dedicated server, to launch it properly.
Once the loader service is started, it will need to create the dedicated server process, passing the appropiate arguments, using CLoader.
Wow.dll will need to include hooks for RegisterServiceCtrlHandler(Ex)(A/W) so that it can catch the address of ServiceMain in the dedicated server.
Now, whenever the loader service receives a notification through it's ServiceMain it'll have to notify Wow.dll, so that it can relay the notification onto the dedicated server's ServiceMain.
I'd suggest creating a window in Wow.dll and using windows messages.
Anyway, that's about it, I think.
If you have any questions about the source, this is the place to ask them.
There's a little bit of info on the FileFront forums where I posted WowLoader originally.
Here's a direct link to the source code: http://upload2.net/page/download/Vno...r-SRC.rar.html
[Local] http://files.h2vista.net/software/Wo...Loader-SRC.rar
Bookmarks