How to avoid the console from apearing.

Yao G. nospamyao at gmail.com
Tue Aug 17 15:06:46 PDT 2010


On Tue, 17 Aug 2010 16:40:02 -0500, John Connors  
<JohnConnors at mailinator.com> wrote:

> [snip]
> It works but a console (from my program) apears while someprogram.exe is
> running. I've read that some optlink switches are needed to make the  
> console disapear.

Try using WinMain instead of main:


---
import core.runtime;

import std.c.windows.windows,
        std.process;


extern(Windows)
int WinMain( HINSTANCE, HINSTANCE, LPSTR, int )
{
     return system( r"bin\someprogram.exe" );
}
---


-- 
Yao G.


More information about the Digitalmars-d-learn mailing list