logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
request for new or changed argument for nwnx4_controller

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Development
View previous topic :: View next topic  
Author Message
0100010



Joined: 11 Jan 2012
Posts: 7

PostPosted: Mon Apr 16, 2012 2:27    Post subject: request for new or changed argument for nwnx4_controller Reply with quote

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
View user's profile Send private message
0100010



Joined: 11 Jan 2012
Posts: 7

PostPosted: Mon Apr 16, 2012 7:21    Post subject: Reply with quote

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
View user's profile Send private message
0100010



Joined: 11 Jan 2012
Posts: 7

PostPosted: Tue Apr 17, 2012 6:27    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Development All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group