关于LockFile的参数问题(感觉MSDN写错了)
BOOL LockFile(
HANDLE hFile,
DWORD dwFileOffsetLow,
DWORD dwFileOffsetHigh,
DWORD nNumberOfBytesToLockLow,
DWORD nNumberOfBytesToLockHigh
);
dwFileOffsetLow
[in] Low-order word of the starting byte offset in the file where the lock should begin.
dwFileOffsetHigh
[in] High-order word of the starting byte offset in the file where the lock should begin.
nNumberOfBytesToLockLow
[in] Low-order word of the length of the byte range to be locked.
nNumberOfBytesToLockHigh
[in] High-order word of the length of the byte range to be locked.
里面说到的Low-order word 和High-order word 应该都是DWORD把,而不是word,word是16位的,如果真是word,那一个dword还分成两个word传进去?那不是自找麻烦吗?
还有很多函数都有类似的错误。
不知道是我理解错了,还是MSDN写错了?
[解决办法]
呵呵
[解决办法]
to 楼主:
别误会,我也总看MSDN对他的错误我有很深的体会,记得以前有个程序需要分配很大的内存,AlloceVirtuleMemory()这个函数MSDN上给的说明就有错误,关于它的参数设置.后来我到网上查找资料才知道是怎么回事,我还以为是我程序上的事情呢,害得我花了好长时间.我的意思不是说楼主这样不好,牛顿第二定律的确是错的!嘿嘿我的意思是说楼主您要心细!
由于我的笔误我道歉!