Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IShellBrowser::BrowseObject not working in XP

30 views
Skip to first unread message

Mick

unread,
Mar 8, 2004, 10:43:47 PM3/8/04
to
In our NSE, we have provided an option to perform a search on our DB. When
the search is done, a new NSE folder is created, and the idea is to browse
directly into this new folder. Once the new folder has been created, we
execute

SHChangeNotify(SHCNE_MKDIR, SHCNF_IDLIST, (LPCVOID)pidl, NULL);

to inform explorer of the new folder's existance, followed by

pShellBrowser->BrowseObject(pidl, SBSP_SAMEBROWSER | SBSP_DEFMODE |
SBSP_ABSOLUTE);

where pShellBrowser is aa references to the IShellBrowser object passed when
the view was created, and pidl is the absolute PIDL (from the Desktop
folder) to the newly created folder in the NSE.

This works great under win2000, but winXP seems to ignore both the
SHChangeNotify and the BrowseObject calls. The new folder is not even
displayed in the tree view, let alone explored to. Have tried passing the
SHCNF_FLUSH flag with the SHChangeNotify also, but that didn't help.

Any ideas anyone?


TIA


Mick


Henk Devos

unread,
Mar 11, 2004, 7:51:21 AM3/11/04
to
For the change notifications:
A good technique is calling SHChangeNotify(0, SHCNF_FLUSH, NULL, NULL) after
your normal SHChangeNotify calls. This will flush all events (including file
system events). But check if your pidl is correct. The event you use should
be SHCNE_MKDIR.
For BrowseToObject:
Use ShellExecuteEx instead.
You may also want to take a look at NSELib, a library+wizard that makes
developing namespace extensions incredibly easy. You can usually convert
your existing project within 1-2 days and use all the advanced features
NSELib offers in a very short time.
You can find it here:
http://www.whirlingdervishes.com/nselib


"Mick" <mick....@NOSPAM.advdata.com.au> wrote in message
news:ubjj7iYB...@TK2MSFTNGP11.phx.gbl...

0 new messages