Hi!
Seems like there's a bug in Windows that doesn't let you call the shutdown API function. A workaround would be to use
this.
Also, read the thread here:
http://bytes.com/forum/thread269280.html. It's on the same issue.
Regards,
Lucian Baciu, MCTS,
http://studentclub.ro/lucians_weblog