GetPrivateProfileInt函数返回值问题!
请问GetPrivateProfileInt函数返回值能用WORD类型接收吗?会有什么不良后果吗?
[解决办法]
UINT GetPrivateProfileInt(
LPCTSTR lpAppName,
LPCTSTR lpKeyName,
INT nDefault,
LPCTSTR lpFileName
);
[解决办法]
UINT
为啥用 WORD?
[解决办法]
WORD 16-bit unsigned integer.
This type is declared in WinDef.h as follows:
typedef unsigned short WORD;
UINT Unsigned INT.
This type is declared in WinDef.h as follows:
typedef unsigned int UINT;
[解决办法]
所以,
用 WORD 可能会丢失高位的信息。