Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SHEmptyRecycleBin Function
#1
do you have an idea why i get error 'exception' when using empty string ?

from msdn:
Quote:pszRootPath
Address of a null-terminated string of maximum length MAX_PATH that contains the path of the root drive on which the Recycle Bin is located. This parameter can contain the address of a string formatted with the drive, folder, and subfolder names (c:\windows\system . . .). It can also contain an empty string or NULL. If this value is an empty string or NULL, all Recycle Bins on all drives will be emptied.

works:
Code:
Copy      Help
SHEmptyRecycleBinA hwnd "c:\" 1
SHUpdateRecycleBinIcon

works not:
Code:
Copy      Help
SHEmptyRecycleBinA hwnd "" 1
SHUpdateRecycleBinIcon
Code:
Copy      Help
dll shell32
,SHEmptyRecycleBinA hwnd $pszRootPath dwFlags
,SHUpdateRecycleBinIcon
def SHERB_NORMAL 0
def SHERB_NOCONFIRMATION 1
def SHERB_NOPROGRESSUI 2  
def SHERB_NOSOUND 4
def SHERB_QUIET 7

thanks
pi
#2
Quote:do you have an idea why i get error 'exception' when using empty string ?

No, here works well.
#3
it was because i used
Code:
Copy      Help
int hwnd=win("Program Manager" "Progman")

this is ok:
Code:
Copy      Help
int hwnd=win()
pi
#4
I tested with 0. To get desktop window handle for similar purpose, often is used GetDesktopWindow, but I don't know why it is better than 0.
#5
i assigned it to middle click on the recycler icon on desktop.
no need for right click anymore
:roll:
pi


Forum Jump:


Users browsing this thread: 1 Guest(s)