D - running exe (win) and console window
- Paul Stanton <Paul_member pathlink.com> Jan 31 2003
- Burton Radons <loth users.sourceforge.net> Jan 31 2003
- "Sean L. Palmer" <seanpalmer directvinternet.com> Feb 01 2003
- Karl Bochert <kbochert copper.net> Feb 07 2003
- Antti Sykari <jsykari gamma.hut.fi> Feb 08 2003
- "Mike Wynn" <mike.wynn l8night.co.uk> Jan 31 2003
Just wondering if anyone knows how to run an executable (d) without the console window appearing? I have written a process which should be a background task, and would prefer to have no window associated with it. Thanks in advance.
Jan 31 2003
Paul Stanton wrote:Just wondering if anyone knows how to run an executable (d) without the console window appearing? I have written a process which should be a background task, and would prefer to have no window associated with it.
Add "-L/exet:nt/su:windows" to the flags when you link. Don't use a WinMain, just a normal main works properly.
Jan 31 2003
But you lose printf that way. ;( Maybe Walter you can define a new stream type in addition to stdin, stdout, stderr: stddebug!!! And on windows this goes to OutputDebugString, otherwise the default is the same as stderr. D doesn't have any console or file I/O of its own right now; it's borrowing everything from the C runtime library. That should get addressed at some point. If printf is built into the language, so should sprintf and fprintf, and thus so should the standard streams, fread, fwrite, etc. That old crufty C stuff is a big mess if you ask me. I'd find a way to build a way to pipe some generic string-builder functionality to any stream. Sean "Burton Radons" <loth users.sourceforge.net> wrote in message news:b1epuj$1785$1 digitaldaemon.com...Paul Stanton wrote:Just wondering if anyone knows how to run an executable (d) without the
window appearing? I have written a process which should be a background task, and would
have no window associated with it.
Add "-L/exet:nt/su:windows" to the flags when you link. Don't use a WinMain, just a normal main works properly.
Feb 01 2003
On Sat, 1 Feb 2003 04:59:57 -0800, "Sean L. Palmer" <seanpalmer directvinternet.com> wrote:But you lose printf that way. ;( Maybe Walter you can define a new stream type in addition to stdin, stdout, stderr: stddebug!!! And on windows this goes to OutputDebugString, otherwise the default is the same as stderr.
While you're at it, why not have 'stdkey' which is to stdin as stderr is to stdout? Karl Bochert
Feb 07 2003
Karl Bochert <kbochert copper.net> writes:On Sat, 1 Feb 2003 04:59:57 -0800, "Sean L. Palmer" <seanpalmer directvinternet.com> wrote:But you lose printf that way. ;( Maybe Walter you can define a new stream type in addition to stdin, stdout, stderr: stddebug!!! And on windows this goes to OutputDebugString, otherwise the default is the same as stderr.
While you're at it, why not have 'stdkey' which is to stdin as stderr is to stdout?
Heh - this reminds me of another proposition, namely "why not have default values for function return values, like in some languages we have default values for arguments". Now, how would it work? -Antti
Feb 08 2003
you might find these links useful http://www.digitalmars.com/d/windows.html http://www.l8night.co.uk/mwynn/d/win32api.html http://www.codemoon.com/cm/artlist.php?index=main "Paul Stanton" <Paul_member pathlink.com> wrote in message news:b1epla$174u$1 digitaldaemon.com...Just wondering if anyone knows how to run an executable (d) without the
window appearing? I have written a process which should be a background task, and would
have no window associated with it. Thanks in advance.
Jan 31 2003









Karl Bochert <kbochert copper.net> 