View previous topic :: View next topic |
Author |
Message |
0100010
Joined: 11 Jan 2012 Posts: 7
|
Posted: Mon Apr 16, 2012 2:27 Post subject: request for new or changed argument for nwnx4_controller |
|
|
As far as I can tell, if you do not specify the -interactive argument, then no window for nwn2server.exe is created at all. (and by no window I mean FindWindow and EnumWindows will not return a valid handle matching the known class name)
This means that xp_srvadmin and any other programs that need to interact with the gui controls on the nwserver gui will not work.
I do want the nwserver gui hidden, but also to actually exist via a call-up with a window style of hidden. |
|
Back to top |
|
|
0100010
Joined: 11 Jan 2012 Posts: 7
|
Posted: Mon Apr 16, 2012 7:21 Post subject: |
|
|
Ok so should be able to accomplish this by adding in a -hidden parm which works when -interactive is also present and modifying the values in the si STARTINFO structure in NWNXController::startServerProcessInternal() to include the STARTF_USESHOWWINDOW (0x00000001) bit in si.dwFlags and SW_HIDE (value 0) assigned to si.wShowWindow to try to get it to launch as hidden, yet still interactive.
I have the revision 100 soure, but can't bulid it due to missing detours.lib (and I did grab detours express 2.1 and have the Windows SDK but still cant get detours.lib to build)
Startup Info Structure
ShowWindow function |
|
Back to top |
|
|
0100010
Joined: 11 Jan 2012 Posts: 7
|
Posted: Tue Apr 17, 2012 6:27 Post subject: |
|
|
Success!
Updated the following files to support a -hidden parameter, which when used with
controller.cpp
controller.h
main.cpp
My main purpose for adding this feature was so I could launch a NWNX controller nwn2server, and force nwn2main to launch in a direct connect mode to the localhost, thereby bringing NWNX features to nwn2main SP modules in a somewhat indirect but still very usable way. |
|
Back to top |
|
|
|