Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Extcap

From: Tomasz Moń <desowin@xxxxxxxxx>
Date: Fri, 3 Oct 2014 22:22:32 +0200
On Fri, Oct 3, 2014 at 10:16 PM, Tomasz Moń <desowin@xxxxxxxxx> wrote:
> On Fri, Oct 3, 2014 at 5:17 PM,  <mmann78@xxxxxxxxxxxx> wrote:
>> Console App written in C(++) and not have the ugly console window pop up when you start
>> capturing.
>>
>> If these are indeed "intended limitations", than yes documenting on the Wiki
>> would be a good start.
>
> This is the way how it works in Windows.
>
> If you want to get rid of that console window you can change the
> application type to Windows application (the difference is just one
> byte in PE header). This will get your application to start without
> standard handles (stdin, stdout, stderr). This is what I am going to
> do in USBPcapCMD sometime soon.

gspawn-win32-helper.c has a nice comment about this issue:
/* We build gspawn-win32-helper.exe as a Windows GUI application
 * to avoid any temporarily flashing console windows in case
 * the gspawn function is invoked by a GUI program. Thus, no main()
 * but a WinMain(). We do, however, still use argc and argv tucked
 * away in the global __argc and __argv by the C runtime startup code.
 */