Yes, ReadDirectoryChangesW
#if(_WIN32_WINNT >= 0x0400)
WINBASEAPI
BOOL
WINAPI
ReadDirectoryChangesW(
__in HANDLE hDirectory,
__out_bcount_part(nBufferLength, *lpBytesReturned) LPVOID lpBuffer,
__in DWORD nBufferLength,
__in BOOL bWatchSubtree,
__in DWORD dwNotifyFilter,
__out LPDWORD lpBytesReturned,
__inout LPOVERLAPPED lpOverlapped,
__in_opt LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
);
#endif /* _WIN32_WINNT >= 0x0400 */
#if(_WIN32_WINNT >= 0x0400)
WINBASEAPI
BOOL
WINAPI
ReadDirectoryChangesW(
__in HANDLE hDirectory,
__out_bcount_part(nBufferLength, *lpBytesReturned) LPVOID lpBuffer,
__in DWORD nBufferLength,
__in BOOL bWatchSubtree,
__in DWORD dwNotifyFilter,
__out LPDWORD lpBytesReturned,
__inout LPOVERLAPPED lpOverlapped,
__in_opt LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
);
#endif /* _WIN32_WINNT >= 0x0400 */
会不会是。net2005把这个函数去掉或是换了其他的?
加上“#define _WIN32_WINNT 0x0500 ” 就可以了这条语句代表什么?
Windows Server 2003 _WIN32_WINNT>=0x0502
WINVER>=0x0502
Windows XP _WIN32_WINNT>=0x0501
WINVER>=0x0501
Windows 2000 _WIN32_WINNT>=0x0500
WINVER>=0x0500
Windows NT 4.0 _WIN32_WINNT>=0x0400
WINVER>=0x0400
Windows Me _WIN32_WINDOWS=0x0500
WINVER>=0x0500
Windows 98 _WIN32_WINDOWS>=0x0410
WINVER>=0x0410
Windows 95 _WIN32_WINDOWS>=0x0400
WINVER>=0x0400
ReadDirectoryChangesW要求_WIN32_WINNT >=0x0400 , 一般<windows.h>中至少已定义了_WIN32_WINNT 0x0400, 应该直接就可以使用.