Jump to content
uniGUI Discussion Forums
hoomanra

Shutdown the standalone server by code

Recommended Posts

Good Day All,

 

Is there a way to shutdown the standalone unigui server by code (unigui function)? I can kill the app using windows api but I was wondering if there is a function somewhere in UniGUI framework that would do this.

 

Thanks,

 

 

Share this post


Link to post
Share on other sites

As mentioned in my question, I want the standalone webserver to shutdown, not the webapplication (i.e. the web session).

 

Uniapplication.terminate just terminates the active session and not the web server.

Share this post


Link to post
Share on other sites

There is a much cleaner way to do this...

 

ExitProcess(0);  will terminate the application without proper shutdown...

 

Use:

 

UniApplication.Terminate('GoodBye');  // to put the app in a closed state in the browser

PostThreadMessage(MainThreadID,wm_quit,0,0);  // will tell the main application to terminate 
 

 

Use only for testing though... or users will be able to terminate the server.exe

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×