Microsoft KB Archive/235586

{|
 * width="100%"|

BUG: "Empty Recycle Bin" Unavailable After Deletion by SHFileOperation

 * }

Q235586

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), included with:
 * Microsoft Windows NT Server version 4.0
 * Microsoft Windows NT Workstation version 4.0

-

SYMPTOMS
After an application uses SHFileOperation to delete files (FO_DELETE), which are moved to the Recycle Bin (FOF_ALLOWUNDO), the Empty Recycle Bin menu item (found on the pop-up menu when you right-click the bin and also on the Windows Explorer File menu) will remain unavailable.

CAUSE
The shell maintains information on the current state of the Recycle Bin. Recycle Bin uses this information to determine if there are objects in it and disables the Empty Recycle Bin option if no files are present.

When SHFileOperation is used to send files to the Recycle Bin, this information only gets updated if the SHFileOperation call is being made from within the shell's process.

STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

Additional query words:

Keywords : kbAPI kbLib kbOSWinNT400bug kbShellGrp kbGrpDSUser kbOSWin32s

Issue type : kbbug

Technology : kbAudDeveloper kbWin32sSearch kbWin32API