I'm sure I'm actually mute something and do not see it, but someone can tell me that Why are the following codes taking place in the passage in the directory?
When calling this code, making and modifying files or directories passed in the m_directory are ignored. But if I call
postquise closed position (m_h compilation port, 0, 0, zero);
Then GetquueuedCompletionStatus exits correctly Does anyone see what I'm doing? Here is the code:
// To create a handle to log on, dial handle log diamondhole = create file (m_directory, FILE_LIST_DIRECTORY, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, NULL) ; // create full port m_hCompletionPort = CreateIoCompletionPort (logdirhandel, zero, 0, 1); // DWORD initial registration for dwBufLength changes; FILE_NOTIFY_INFORMATION notifyInfo; Overlapped overlapped; ReadDirectoryChangesW (logDirHandle, & amp; notifyInfo, MAX_BUFFER, correct, FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_CREATION, & dwBufLength, & overlap, zero); // Wait for a change LPOVERLAPPED lpOverLapped; Ulaan Key; DWORD numbetes; GetQueuedCompletionStatus (m_hCompletionPort, & amp; numBytes, & amp; Key, & amp; lpOverLapped, Infinite))
Edit:
OK, I'm sure That was the thought for ReadDirectoryChangesW () that was returning true (but not so). GetLastError () tells me error ERROR_INVALID_HANDLE (6). The odd thing is that logDirHandle appears to be valid and there is an error in calling Call to CreateFile ().
In addition, I have little synchronous ReadDirectoryChangesW except for losing the overlap stuff and making the call to keep everything right and it worked fine. So am I guessing I'm incorrectly implementing overlap stuff?
Did you check prices instead? And is it on a network?
EDIT: You might want to start Overlopp at zero.
Comments
Post a Comment