SHChangeNotify doesn't work for deletes

SHChangeNotify doesn't work for deletes

Post by Andrew le Biha » Fri, 29 Mar 2002 22:12:05



My namespace extension does all of the Shell Notification stuff - and all of
it works with the exception of "deletes".  I'm using both of these (one of
each for folders or files):

SHChangeNotify(SHCNE_RMDIR, SHCNF_IDLIST, pidl, NULL);
SHChangeNotify(SHCNE_DELETE, SHCNF_IDLIST, pidl, NULL);

and while it often works in the view, it pretty much never works in the
treeview.  This tends to leave folders in place where there are none and so
on...

Is this a known problem?  Alternatively, is there a known way to
programatically force a refresh of the treeview - and get rid of all of the
cached info?

Andy

 
 
 

SHChangeNotify doesn't work for deletes

Post by David Lownde » Sat, 30 Mar 2002 06:22:35


Quote:>and while it often works in the view, it pretty much never works in the
>treeview.  This tends to leave folders in place where there are none and so
>on...

>Is this a known problem?

Andy,

Not that it's any help for your problem, but the incorrect updating of
the Explorer tree view is certainly common behaviour that's existed in
Explorer in one form or another for as long as I can remember!

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.

 
 
 

SHChangeNotify doesn't work for deletes

Post by Timo Kunz » Sat, 30 Mar 2002 06:54:16


The Windows Explorer of Windows XP has not just this bug concerning
AutoUpdate. There are a lot of problems...
 
 
 

SHChangeNotify doesn't work for deletes

Post by Andrew le Biha » Wed, 03 Apr 2002 19:59:56


Thanks all for your contributions - the solution was pretty simple and
embarrassing.  I stripped out the "front end" of the pidls to process them,
so the pidls SHChangeNotify was receiving were relative to the namespace
root and not the desktop.

Why this worked for "Creates" and not "Deletes" I don't know...

Andy



Quote:> My namespace extension does all of the Shell Notification stuff - and all
of
> it works with the exception of "deletes".  I'm using both of these (one of
> each for folders or files):

> SHChangeNotify(SHCNE_RMDIR, SHCNF_IDLIST, pidl, NULL);
> SHChangeNotify(SHCNE_DELETE, SHCNF_IDLIST, pidl, NULL);

> and while it often works in the view, it pretty much never works in the
> treeview.  This tends to leave folders in place where there are none and
so
> on...

> Is this a known problem?  Alternatively, is there a known way to
> programatically force a refresh of the treeview - and get rid of all of
the
> cached info?

> Andy

 
 
 

1. SHChangeNotify doesn't update the treeview

I use SHChangeNotify when I insert and remove a folder in my namespace extension.
At the start the folder is not there. I add the folder and call SHChangeNotify.
It calls back into my code and finally displays the folder in the treeview. Then
I remove the folder and call SHChangeNotify again which works.

The problem starts here. I reinsert the same folder and call SHChangeNotify. It
calls back into my code but doesn't display the folder in the treeview. Looks
like if fails in a CompareID.

But if I do a refresh when the folder is not there and reinsert it then it works.
Basically, it works once afterI do a refresh.

Does anyone have an idea of what could be wrong?

I tried with SHCNE_MKDIR, SHCNE_UPDATEDIR, SHCNE_RMDIR.

Thanks,
Ghislain

2. Missing header?

3. Why doesn't this global delete work in vi?

4. Where can i buy frame for the large fomat print from epson 1200?

5. Delete Key doesn't work in Datawindow

6. Simple Technology 32Mb Compact Flash memory card

7. The Zone doesn't work even when it isn't working

8. Why option 'pages=' doesn't work in 'proc tree'?

9. regexp '[\w]' doesn't seem to work ...

10. 'out' type parameter in Long sequence doesn't work!

11. vb32: 'bank' demo client doesn't work

12. Minix-386.vm keyboard [ should be 'Demo disk doesn't work..']