The following code causes the thread to exit at the close of the program with a -1. When run under the IDE (VCPP 5), either Debug or Release delays return to the editor for a second or so.


char pszPathname[] "C:\\My Documents");


SHFILEINFO shfi;


SHGetFileInfo(pszPathname, 0, &shfi, sizeof(SHFILEINFO), \

SHGFI_SMALLICON | SHGFI_SYSICONINDEX);


GetLastError() returns 18- ERROR_NO_MORE_FILES.


This occurs for any call for info on ANY file in the 'My Documents' directory.


Seems to be a MYDOCS.DLL but happens with Windows95 and 98.


Any ideas?


Thanks in advance,

Fred