Papierkorb auslesen

The place for programming-related topics.
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Post by TiKu »

Anonymous wrote:
SHGetSpecialFolderLocation Me.hWnd, &H0, pIDLDesktop
Debug.Print pIDLDesktop
gives 1670016, not 0.
So it fails for the recycler only.
Anonymous wrote:ii = SHGetFolderLocation(Me.hwnd, CSIDL_BITBUCKET, 0, 0, pIDLRecycleBin)
Debug.Print pIDLRecycleBin, ii, Hex(ii)
gives
0 -2147024809 80070057
Just what I expected: Both APIs use the same code internally and therefore both fail.

I've opened a thread in news://microsoft.public.platformsdk.shell.

TiKu
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Guest

Post by Guest »

Thanks a lot, Timo, I'll watch this thead.
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Post by TiKu »

Hi,

maybe you've already read Jim Barry's newsgroup posting. He can reproduce the problem, if he deletes the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{645FF040-5081-101B-9F08-00AA002F954E}

Maybe you've removed this key to hide the recycle bin from your desktop. You shouldn't do this. TweakUI removes the recycle bin in another way, which doesn't cause the problems you encountered. However, I can't tell you what TweakUI is doing in detail.

TiKu
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Thomas

Post by Thomas »

Thanks a lot, Timo, for your efforts!!

Your code is working now. Very fine!!

The remaining downer is, that the code does not return the original filenames but the names, windows uses to administrate the recyle bin. (f.i. dg20, dh3...)
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Post by TiKu »

The original poster (Laurin) wanted it this way. I've attached a version that reads out the friendly names.
Attachments
BitBucketReader.zip
This version uses friendly names instead of paths
(6.79 KiB) Downloaded 487 times
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Thomas

Post by Thomas »

Thank you again for your last sample. It's great though hard to understand ;-)
I tried to cope with it and get further infos like delete-date or origin of a deleted file but failed :-(
No matter, if you don't like to deal with this problem any more, but if maybe even you are keen on this feature and would share your knowledge ...

Sorry, I don't want to be ungraceful!

Thanks a lot for all you done so fare!
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Post by TiKu »

I've replaced the textbox with my listview control, made the app Unicode-aware and implemented the requested features.
It won't run on Windows 9x/Me anymore, because those systems don't support Unicode. It also probably won't run on Windows NT 4.0 anymore, because this system probably doesn't support the IShellFolder2 interface. You could try to use IShellDetails instead, if you need support for NT4.

TiKu
Attachments
BitBucketReader.zip
Made the sample Unicode-aware, changed the textbox to a listview and list the deleted files' details
(323.38 KiB) Downloaded 510 times
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Thomas

Post by Thomas »

WOW. Great!!

Won't bother you any more ;-)

Thanks a lot!
Post Reply