NetFileEnum and GetLastError 997
I have an MFC dialog base application.
It uses NetFileEnum to get the all open files.
NetFileEnum() returned NERR_Success, but the bufptr is NULL. Also when I checked the GetLastError(), it returned 997( Overlapped I/O operation is in progress. )
OS: Windows XP SP2
Installed: Platform SDK2003
PFILE_INFO_3 pBuffer;
PFILE_INFO_3 pCurrent;
DWORD dwEntriesread = 0;
DWORD dwTotalentries = 0;
DWORD dwStatus = NetFileEnum( NULL,NULL,NULL,3,( LPBYTE* )&pBuffer,MAX_PREFERRED_LENGTH,&dwEntriesread,&dwTotalentries, NULL );
Could you please tell me y this error?
Re: NetFileEnum and GetLastError 997
Are you calling NetApiBufferFree after each call to NetFileEnum?