View previous topic :: View next topic |
Author |
Message |
Xildjian
Joined: 08 Jan 2005 Posts: 100
|
Posted: Mon Apr 25, 2005 15:56 Post subject: Help requested for new windows plugin - Killserver |
|
|
I thought I'd take a shot at a graceful means to shutdown the nwn server for restarts. After, looking through the nwn standalone server install directory I noticed the nwnpid file. Sweet, the server leaves it's PID. So doing a little research on the MSDN web site I found an example that looks like it would work.
The plan:
1) read in the PID from the file
2) get the handle to the process
3) terminate the process
Sounds simple and elegant enough. However, when I make a call to the OpenProcess function I keep getting a return error of invalid parameter. I pretty much cut and pasted from the example I found and looked at the manual page for this function and can't see why I'm getting an invalid parameter. Any help/suggestions would be appreciated. Below is a zip file with my source code.
http://home.comcast.net/~xildjian/Killserver.zip
Thanks, _________________ Member Shadow of Iniquity development team |
|
Back to top |
|
|
Moonunit921
Joined: 10 Sep 2005 Posts: 11 Location: The Yawning Portal Tavern, Waterdeep
|
Posted: Sun Nov 13, 2005 17:55 Post subject: |
|
|
Have you solved this problem yet? |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Tue Nov 15, 2005 21:03 Post subject: |
|
|
An alternative way might be to just call
somewhere in your plugin. _________________ Papillon |
|
Back to top |
|
|
Xildjian
Joined: 08 Jan 2005 Posts: 100
|
Posted: Wed Nov 16, 2005 3:13 Post subject: |
|
|
Nope, haven't looked at it since I asked for help.
Wouldn't exit(0) refer to the plugin and not the nwn server? _________________ Member Shadow of Iniquity development team |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Fri Nov 18, 2005 21:11 Post subject: |
|
|
exit(0) terminates the process, and nwnx and it's plugins are part of the nwn server process.... _________________ Papillon |
|
Back to top |
|
|
Xildjian
Joined: 08 Jan 2005 Posts: 100
|
Posted: Tue Nov 22, 2005 18:04 Post subject: |
|
|
Papillon wrote: | exit(0) terminates the process, and nwnx and it's plugins are part of the nwn server process.... |
I'll have to try that when I get a chance, that would be to easy if it works. But, will it restart the server as expected or just shut everything down? _________________ Member Shadow of Iniquity development team |
|
Back to top |
|
|
Asmodae
Joined: 07 Jan 2005 Posts: 55
|
|
Back to top |
|
|
|