Page 3 of 3
Posted: 10 Feb 2006, 15:37
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
Posted: 10 Feb 2006, 17:38
by Guest
Thanks a lot, Timo, I'll watch this thead.
Posted: 15 Feb 2006, 14:12
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
Posted: 15 Feb 2006, 15:08
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...)
Posted: 15 Feb 2006, 15:46
by TiKu
The original poster (Laurin) wanted it this way. I've attached a version that reads out the friendly names.
Posted: 16 Feb 2006, 11:18
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!
Posted: 16 Feb 2006, 12:33
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
Posted: 16 Feb 2006, 14:32
by Thomas
WOW. Great!!
Won't bother you any more
Thanks a lot!