View previous topic :: View next topic |
Author |
Message |
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Sat Mar 15, 2008 0:33 Post subject: Detoured NWNX 1.09 |
|
|
Madcodehook, which helps NWNX into the server process, is no longer available for free, and has accumulated numerous other issues over the last few months. Therefore, I have implemented an alternative hooking mehod over the last few days.
Here is a first version of NWNX that uses Detours. It is similar to mckillroy's version on the vault, with even more changes under the hood (e.g. no DDE for interprocess communication any more). Thanks go to him for implementing NWNX with detours and sharing the code. Thanks go also to Skywing, whose code gave me some ideas how to get rid of DDE.
You can download the first preview release of 1.09 here:
NWNX 1.09 preview 1
I am interested to hear how it works for you, especially on Vista, 64 bit systems, and in Wine on Linux.
Btw, the updated MySQL plugin with reconnect functionality is included as well. _________________ Papillon |
|
Back to top |
|
|
TroveLord
Joined: 22 Nov 2006 Posts: 136 Location: Italy
|
Posted: Sat Mar 15, 2008 11:48 Post subject: Re: Detoured NWNX 1.09 |
|
|
Papillon wrote: | the updated MySQL plugin with reconnect functionality is included as well. |
Does it include virusman object storage functions? |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Sun Mar 16, 2008 9:32 Post subject: Re: Detoured NWNX 1.09 |
|
|
No, I haven't looked into that yet. _________________ Papillon |
|
Back to top |
|
|
Grinning Fool
Joined: 12 Feb 2005 Posts: 264
|
Posted: Tue Mar 18, 2008 18:15 Post subject: |
|
|
I'll grab this update during this week. Glad to hear about getting rid of DDE - I've been noticing sometimes a failure to connect because the server is too busy loading before it can handle the DDE message. _________________ Khalidine, a NWN2 persistent world
Looking for volunteers. |
|
Back to top |
|
|
Grinning Fool
Joined: 12 Feb 2005 Posts: 264
|
Posted: Sat Mar 22, 2008 6:03 Post subject: |
|
|
The good news: it seems to be working well on Windows. The bad news is that tihs version, too, is not able to 'see' the server after it launches under WINE. _________________ Khalidine, a NWN2 persistent world
Looking for volunteers. |
|
Back to top |
|
|
Saulus
Joined: 24 Mar 2008 Posts: 7
|
Posted: Mon Mar 24, 2008 21:15 Post subject: |
|
|
Working beautifully on Sundren under Windows Server 2003 R2 Enterprise x64 with the new 1.12 patch.
Really hope we can get virusman's object functions and leto working with this soon, it kind of sucks not having them, but at least things are running under x64! |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Tue Mar 25, 2008 6:54 Post subject: |
|
|
I'll be able to make my plugins compatible as soon as I get the sources. |
|
Back to top |
|
|
Saulus
Joined: 24 Mar 2008 Posts: 7
|
Posted: Tue Mar 25, 2008 21:38 Post subject: |
|
|
Any chance the source will be released soon Papillon? |
|
Back to top |
|
|
mckillroy
Joined: 16 May 2005 Posts: 40
|
Posted: Mon Mar 31, 2008 14:30 Post subject: |
|
|
Thanks a lot. I'll check it out ASAP, but I'm in a moving process in the moment. I'll report once checking is done. _________________ /McKillroy
a.k.a Yorlik |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Sat Apr 12, 2008 10:57 Post subject: |
|
|
I have just updated the subversion repository with the new detours hooking code. Happy hacking ! _________________ Papillon |
|
Back to top |
|
|
Caos81
Joined: 13 Apr 2008 Posts: 9
|
Posted: Sun Apr 13, 2008 13:04 Post subject: |
|
|
It seems like the nwnx has some kind of issue when the NwN2 installation path contains chars like "(" or ")".
I've a server running on a WinXP Pro x64 machine. NwN2 installation path:
C:\Program Files (x86)\Atari\Neverwinter Nights 2
No way to make it run. The NWNX4 gui loads and gets closed immediately.
Moving the NwN2 installation folder somewhere else (es. C:\Neverwinter Nights 2) seems to be the solution atm.
Thanks |
|
Back to top |
|
|
mckillroy
Joined: 16 May 2005 Posts: 40
|
Posted: Thu Jun 05, 2008 23:27 Post subject: |
|
|
Just a quick feedback:
After importing in the latest MS Studio and recompiling from SVN today
I could start the server and log into the module on wine for Solaris 1.0-rc4 (self compiled) and Solaris Express Community edition build 90
BUT: I get an error message:
10:16:40 PM: ! Error: Server did not initialize properly (timeout).
and the time module (the only module I tried) didn't load.
I don't know what it was - still checking.
UPDATE: I raised the grace time to 240000 milliseconds and still got a timeout
- something is definitely wrong here (from a wine perspective)
Seems Shared Memory is buggy on wine .. I'll dig a bit...
I had to get rid of some left madchook linker dependencies in the project first since they gave me errors. Then the compile went smooth.
Restarting the server from NWNX was possible.
Cheers _________________ /McKillroy
a.k.a Yorlik
Last edited by mckillroy on Mon Jun 16, 2008 23:34; edited 3 times in total |
|
Back to top |
|
|
mammalmaster
Joined: 15 Jun 2008 Posts: 1
|
Posted: Sun Jun 15, 2008 14:48 Post subject: Quick Flash |
|
|
I just get a quick flash of the NWNX4 screen then it shuts down.
What are the file paths suppose to look like? |
|
Back to top |
|
|
mckillroy
Joined: 16 May 2005 Posts: 40
|
Posted: Tue Jun 17, 2008 7:32 Post subject: |
|
|
It seems the hook does not get loaded, at least thats what the "guide" in
the demo module tells. Seems the hook failure is haunting me on Solaris
again.
Finally I removed the detours hooking in controller.cpp and used a standard
"CreateProcess" method to start the server from controller.cpp instead.
I used a PE editor to edit the Header of the nwn2server.exe to have the
nwn2server require the NWNX4_hook.dll and imported the dummy
function. After this I could start the server with nwnx4 (I could start it
before as well) and play the demo module with the time plugin and
-module (which I couldn't before.
I'm quite sure now its the hooking method which is still not working.
I don't know whats wrong here - even my old code which used to work on
Solaris 10 /wine 0.9.49 does not work on my new Solaris (SXCE, b90, Wine 1.04) install.
Maybe its something with wine ... I really have no plan.
The good news is that with this workaround it is possible to use NWNX4
on wine/Solaris, which should do on wine/Linux as well.
I'll do further testing.
I have one suggestion:
Could we please have the choice to use dll injection or PE editing to get
NWNX4_hook.dll loaded into the server executable ?
And a nwnx.ini file entry reflecting which method is used ? E.g.:
"dll_method=exehack | dllinject"
and a second ini entry with the the nwn2server executable name like
"executable=nwn2server_x.exe"
- so we could rename the PE-edited executable and not mess up our
PE-edited servers with the original ones, since an edited nwn2server will
require the hook to work at all.
This would allow us to use either a dll-injection mechanism or a
PE-edited server executable - at least as long as we don't have a really
reliable dll injection method for wine.
Cheers
McK. _________________ /McKillroy
a.k.a Yorlik |
|
Back to top |
|
|
Elrahc
Joined: 30 Jan 2007 Posts: 10
|
Posted: Wed Jul 02, 2008 2:37 Post subject: |
|
|
Seems to work just fine so far on the Windows XP 64-bit computer. Thank you! =)
~Elrahc |
|
Back to top |
|
|
|