GlobalMemoryStatusEx(),API函数的使用问题。
#if (_WIN32_WINNT >= 0x0500)
WINBASEAPI BOOL WINAPI GlobalMemoryStatusEx(LPMEMORYSTATUSEX);
#endif
#ifndef WINVER
#define WINVER 0x0400
/*
* If you need Win32 API features newer the Win95 and WinNT then you must
* define WINVER before including windows.h or any other method of including
* the windef.h header.
*/
#endif
#ifndef _WIN32_WINNT
#define _WIN32_WINNT WINVER
/*
* There may be the need to define _WIN32_WINNT to a value different from
* the value of WINVER. I don't have any example of why you would do that.
* However, if you must then define _WIN32_WINNT to the value required before
* including windows.h or any other method of including the windef.h header.
*/
#endif
这里我有点不明白了,它的意思是在windows.h前面#define _WIN32_WINNT吧?
那它内部又定义成WINVER,这个WINVER又需要#define WINVER了?WINVER就是0x0400?
(_WIN32_WINNT >= 0x0500)这不就不成立了吗?
是不是要把它的值改成0x0500?!