[fpc-pascal] Invalid standard handles in Windows service mode?

MegaBrutal megabrutal at gmail.com
Sat Feb 22 07:00:09 CET 2014


2014-02-21 10:18 GMT+01:00 Michael Van Canneyt <michael at freepascal.org>:

> You can check the handle of the StdOutputHandle variable. if it is invalid
> (-1), you don't have output.
>


Thanks for your reply, it helped a lot! StdOutputHandle is 24 when I start
the program on the console, and 0 when it starts as a service. Which means,
StdOutputHandle doesn't get initialized in service mode! I don't know why
is this - the older runtimes didn't have this problem. It's present since
2.6.2.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140222/6ecf34af/attachment.html>


More information about the fpc-pascal mailing list