From: Oleg S. <se...@ma...> - 2002-01-19 19:01:18
|
Hello, Raffaele Sandrini wrote: > > I am confused :-)... > > Everywhere i can see function deklarations/definitions like for example: > > DWORD WINAPI PlayThread(LPVOID lpParameter); > ^^^^^^^ > What the hell does the WINAPI mean and where is that defined? DWIRD is the > type and PlayThread the name and so on I didn't know that there can be > something between the type and the name and beleve me, i searched much > doc... It is a place for function call style declaration, i.e which order is used to put arguments of a function to stack, and who is responsible for clearing stack on return and for marking function as exportable/importable. there are several possible call style keywords: __stdcall, __cdecl, __fastcall, __attribute__((regparm(3))) and two export control keywords: __declspec(dllexport) and __declspec(dllimport) WINAPI is defined as __stdcall in winbase.h these declarations can be mixed: #ifdef MY_EXPORT_SYMBOLS #define MY_EXPORT __declspec(dllexport) #else #define MY_EXPORT __declspec(dllimport) #endif BYTE MY_EXPORT WINAPI foo(); export control keywords could appear near variables to export them as well. > > I think that will be an easy one... :-) > > cheers, > Raffaele Oleg Sesov. |