
Invoking a console app and hiding the console.
If it really matters to you, just write (assuming C++):
extern "C" __declspec(dllimport) extern int __argc;
extern "C" __declspec(dllimport) extern char ** __argv;
int main(int argc, char *argv[]);
int __stdcall WinMain(void *, void *, char *, int) {
return main(__argc, __argv);
Quote:
}
int main(int argc, char *argv[]) {
// Do whatever you would normally do here without a console.
return 0;
Quote:
}
>> >> As usual, there's more than one way to accomplish what you seek.
>> >> A) Instead of a console application, make it a Win32 application with
no
>> >> window. The code will remain the same, except you can't use console
I/O, and
>> >> the main function will be WinMain.
>> >But what if the goal is to stay away from the bastardization of main()
>> >into WinMain()?
>> These are technical newsgroups. Your post
>> is off-topic.
>Awareness of the lock-in mechanisms of commercial products is definitely
>on-topic.
>Tony