Article View: borland.public.cppbuilder.nativeapi
Article #10238Re: Stopping DVD/Audio CD autoplay
From: Remy Lebeau (TeamB)
Date: Fri, 07 May 2004 00:15
Date: Fri, 07 May 2004 00:15
28 lines
2251 bytes
2251 bytes
"Simon Macneall" <macneall-at-iinet.net.au> wrote in message
news:Xns94E24E78DCBC3macnealliinetnetau@207.105.83.66...
> All I did was create a class that implements the interface and added it to
> my executable.
Further reading of MSDN shows the following:
"Upon presentation of media, the Shell searches the ROT for a component
implementing IQueryCancelAutoPlay. If one is found, ***the class identifier
(CLSID) of that component's moniker*** is extracted."
This suggests that your IQueryCancelAutoPlay interface has to support the
IMoniker interface as well. IMoniker derives from IPersist, which has a
GetClassID() method for retreiving the object's CLSID. I will bet that your
interface does not support that properly, so when the OS goes looking for
your object, it can't verify the CLSID so your interface doesn't get called
to block the AutoRun. If you look in your QueryInterface(), does
IID_IMoniker (or similar) ever get requested?
I do notice that there is a SHCreateQueryCancelAutoPlayMoniker() function
available as well.
BTW, how are you adding your interface to the ROT in the first place?
Gambit
Technical Details
Message-ID:
<409ad659$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<Xns94E15253CC42Fmacnealliinetnetau@207.105.83.66> <409984a1$1@newsgroups.borland.com> <Xns94E160383D857macnealliinetnetau@207.105.83.66> <4099b0ae$1@newsgroups.borland.com> <Xns94E24E78DCBC3macnealliinetnetau@207.105.83.66>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,dcdee2de1c7c274c X-Google-Attributes: gid10cc67,public From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <Xns94E15253CC42Fmacnealliinetnetau@207.105.83.66> <409984a1$1@newsgroups.borland.com> <Xns94E160383D857macnealliinetnetau@207.105.83.66> <4099b0ae$1@newsgroups.borland.com> <Xns94E24E78DCBC3macnealliinetnetau@207.105.83.66> Subject: Re: Stopping DVD/Audio CD autoplay Date: Thu, 6 May 2004 17:15:03 -0700 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 67.22.138.253 Message-ID: <409ad659$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1083889241 67.22.138.253 (6 May 2004 17:20:41 -0700) Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail