一直没整明白WINBASEAPI BOOL WINAPI 是什么意思
HLOCAL
WINAPI
LocalAlloc (
UINT fuFlags,
UINT cbBytes
);
LPVOID
WINAPI
VirtualAlloc(
LPVOID lpAddress,
DWORD dwSize,
DWORD flAllocationType,
DWORD flProtect
);
HMODULE
WINAPI
LoadLibraryExA(
IN LPCSTR lpLibFileName,
IN HANDLE hFile,
IN DWORD dwFlags
);
WINBASEAPI
HGLOBAL
WINAPI
LoadResource(
HMODULE hModule,
HRSRC hResInfo
);
WINBASEAPI
HANDLE
WINAPI
FindFirstChangeNotificationA(
IN LPCSTR lpPathName,
IN BOOL bWatchSubtree,
IN DWORD dwNotifyFilter
);
………………
上面的定义像这种:WINBASEAPI BOOL WINAPI
HLOCAL
WINAPI
LPVOID
WINAPI
HMODULE
WINAPI
WINBASEAPI
HANDLE
WINAPI
等等这些都是什么意思呀? 在哪找到资料呢?
看到一头雾水。
[解决办法]
直接通过 VS 工具去看这些宏的定义不就清楚了
例如
#if !defined(_KERNEL32_)
#define WINBASEAPI DECLSPEC_IMPORT
#else
#define WINBASEAPI
#endif
#if (defined(_M_IX86) || defined(_M_IA64) || defined(_M_AMD64)) && !defined(MIDL_PASS)
#define DECLSPEC_IMPORT __declspec(dllimport)
#else
#define DECLSPEC_IMPORT
#endif