Page 1 of 1

HOWTO - Hiding the console on Windows

Posted: Sat Apr 10, 2010 2:43 am
by m35
I have the newLISP web server locally serving up custom RSS feeds generated by a little newLISP cgi script. Of course having the newLISP server console window lingering on screen isn't very nice, so I found an easy fix. Add this to the httpd-conf.lsp script, and your newLISP web server console window will happily run in the background.

Code: Select all

(import "kernel32.dll" "GetConsoleWindow")
(import "user32.dll" "ShowWindow")
(constant 'SW_HIDE 0)
(constant 'SW_SHOW 5)

(setq hwndConsole (GetConsoleWindow))
(if-not (zero? hwndConsole)
    (ShowWindow hwndConsole SW_HIDE)