|
From: Ioannis V. <no...@ho...> - 2003-03-02 18:28:15
|
I sent an email some hours ago and i haven't seen it yet. Probably it wil=
l
arrive some weeks later, these things happen.=0D
=0D
It was:=0D
=0D
It's time for me to ask a question. I have been learning .NET lately an=
d
as=0D
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=0D
console was in the back. My guess is that tmain() is provided in an MS=0D
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=0D
to my code. I modified it until the compiler shuts up. Now i use it in th=
e=0D
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=0D
do? What are tmain(), _tmain(), in what they differ between each other an=
d=0D
how they differ from main()? tmain(), _tmain() are Win32 API functions or=
=0D
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
|