int WINAPI WinMain(...) ~ hey guys, can tell me what does the WINAPI mean?
Hello!
i m a student doing my Final Year Project. i m given a software task using Visual C++ to make an application running a Bluetooth device. Though i m familiar with C and C++, i m very new to Visual C++..
i m given thousands of lines of code to look at now.. though i can recognise the language, there are many things that are unfamiliar to me :(
int WINAPI WinMain(...) { ... }
Can anybody tell me what is WINAPI? Why is it declared after the type and before the function name?
i have checked up Microsoft MSDN site and searched the forum here but to no positive results..
hope brothers here can help me~ thanks!!
Re: int WINAPI WinMain(...) ~ hey guys, can tell me what does the WINAPI mean?
From MSDN:
Quote:
WINAPI - Use in place of FAR PASCAL in API declarations. If you are writing a DLL with exported API entry points, you can use this for your own APIs.
Quote:
Obsolete Calling Conventions
Home | Overview | How Do I
The __pascal, __fortran, and __syscall calling conventions are no longer supported. You can emulate their functionality by using one of the supported calling conventions and appropriate linker options.
WINDOWS.H now supports the WINAPI macro, which translates to the appropriate calling convention for the target. Use WINAPI where you previously used PASCAL or __far __pascal.
Quote:
WINAPI - Calling convention for the Win32 API.
Re: int WINAPI WinMain(...) ~ hey guys, can tell me what does the WINAPI mean?
thanks Alin,
but what does this line mean anyway then?
WINAPI - Calling convention for the Win32 API
why is the macro placed between the type and function name?
Re: int WINAPI WinMain(...) ~ hey guys, can tell me what does the WINAPI mean?
Functions in C++ can use different calling convetions.
Calling conventions describe how the argumens of the functions are passed ( in which order etc), name decoration etc.
Check MSDN for "calling conventions" and you will find out much more details about these topics.
Re: int WINAPI WinMain(...) ~ hey guys, can tell me what does the WINAPI mean?
WINAPI = __stdcall
that's the calling convension for windows api
Re: int WINAPI WinMain(...) ~ hey guys, can tell me what does the WINAPI mean?
Ure right click->Go to definition to look at the definition of any unknown identifier.
Re: int WINAPI WinMain(...) ~ hey guys, can tell me what does the WINAPI mean?
Quote:
Originally Posted by overtime_e
Hello!
i m a student doing my Final Year Project. i m given a software task using Visual C++ to make an application running a Bluetooth device. Though i m familiar with C and C++, i m very new to Visual C++..
i m given thousands of lines of code to look at now.. though i can recognise the language, there are many things that are unfamiliar to me :(
int WINAPI WinMain(...) { ... }
Can anybody tell me what is WINAPI? Why is it declared after the type and before the function name?
i have checked up Microsoft MSDN site and searched the forum here but to no positive results..
hope brothers here can help me~ thanks!!
DEar friend
Pl send the full code so that i can give explanation for these
M.Kathiresan
Sub Divisional Engineer Telecom
BSNL
INDIA
[email protected]
Re: int WINAPI WinMain(...) ~ hey guys, can tell me what does the WINAPI mean?
One option is to install "Visual Assist", the great software to help you do and understand coding better in visual C++ 6 as well as visual C++ .net
Visual Assist shows you the macro definitions in a toolbar of its own in the same window along with many other benefits. You dont have to do right click + go to definition stuff.
I will also recommend you to have a copy of "Programming Windows" by "Charles Petzold" on your desk when you are doing programming for windows in Win32 API. This great book will explain you many basic windows data types and many other good stuff. You can say it is a bible for windows programming.
Re: int WINAPI WinMain(...) ~ hey guys, can tell me what does the WINAPI mean?
If the code is successfull compiled, you can use F12 key to go to any functions, keywords definition.
Re: int WINAPI WinMain(...) ~ hey guys, can tell me what does the WINAPI mean?
Oh My Goodness, what kind of freaking MORONS are you people??? Dude, just Google it and you'll get your answer. In fact let me Google that for you http://lmgtfy.com/?q=What+is+WINAPI
It constantly amazes me how incredibly STUPID some of these people are and most of them come from India. Try thinking a little bit. Are you so used to stealing test answers and faking resumes that you truly can't figure out something simple on your own?????
Re: int WINAPI WinMain(...) ~ hey guys, can tell me what does the WINAPI mean?
Why on earth did you wake up an 8 year old thread with that post?
Re: int WINAPI WinMain(...) ~ hey guys, can tell me what does the WINAPI mean?
Quote:
Originally Posted by
S_M_A
Why on earth did you wake up an 8 year old thread with that post?
I think he ran out of pills :) his first post and the only thing he does is calling names.
Re: int WINAPI WinMain(...) ~ hey guys, can tell me what does the WINAPI mean?
Quote:
Originally Posted by
MonkeyCrackAss
... some of these people are and most of them come from India.
Well, at least we know where they come from.
And you seem to come from nowhere... :rolleyes: