Article View: borland.public.cppbuilder.nativeapi
Article #5970Re: Shell popup menu
From: Remy Lebeau (TeamB)
Date: Wed, 22 Jun 2005 20:20
Date: Wed, 22 Jun 2005 20:20
22 lines
1785 bytes
1785 bytes
"qyte" <gyte@vivodinet.gr> wrote in message
news:42b95c7f@newsgroups.borland.com...
> To be more specific i built the following test project...
That code is wrong for so many reasons. Asside from all the memory leaks
(you must call Release() on every interface you retrieve, and free the
ITEMIDLIST that ParseDisplayName() returns), you are also not using
BindToObject() correctly. For one thing, you requested it to return
IContextMenu and then are casting the returned pointer to IShellFolder
instead. That is completely wrong. Also, you did not heed what I told you
earlier:
"You have to first retreive the IShellFolder interface for the
folder/file's ***parent*** folder."
That is a very important step that you are completely ignoring. Please see
my other reply.
Gambit
Technical Details
Message-ID:
<42b9c800$3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!news.maxwell.syr.edu!news.glorb.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<42b77365@newsgroups.borland.com> <42b781a4@newsgroups.borland.com> <42b95c7f@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,49d4c9bc0c0cea4b X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <42b77365@newsgroups.borland.com> <42b781a4@newsgroups.borland.com> <42b95c7f@newsgroups.borland.com> Subject: Re: Shell popup menu Date: Wed, 22 Jun 2005 13:20:15 -0700 Lines: 24 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <42b9c800$3@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1119471616 68.69.17.41 (22 Jun 2005 13:20:16 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!news.maxwell.syr.edu!news.glorb.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail