|
From: Ioannis V. <no...@ho...> - 2003-03-02 16:49:55
|
It's time for me to ask a question. I have been learning .NET lately and =
as
a default main() for a managed application tmain() is provided.=0D
=0D
However this tmain() thing runs a console, so my GUI app was in front and=
a
console was in the back. My guess is that tmain() is provided in an MS
attempt to make the code as much unportable as possible (vendor lock in).=
=0D
=0D
=0D
To overcome this problem i saw a WinMain() from a Win32 app and i placed =
it
to my code. I modified it until the compiler shuts up. Now i use it in th=
e
style:=0D
=0D
=0D
int __stdcall WinMain()=0D
{=0D
Application::Run(new CppForm);=0D
=0D
=0D
return 0;=0D
}=0D
=0D
=0D
and i get no warnings.=0D
=0D
=0D
I have the following curiosity questions:=0D
=0D
Is this definition of WinMain() Win32 valid? What __stdcall is supposed t=
o
do? What are tmain(), _tmain(), in what they differ between each other an=
d
how they differ from main()? tmain(), _tmain() are Win32 API functions or
not? (=3Dthey are new to .NET).=0D
=0D
=0D
Thank you in advance.=0D
=0D
=0D
Ioannis Vranos=0D
=0D
* Programming pages: http://www.noicys.freeurl.com=0D
* Alternative URL: http://run.to/noicys=20
|