Click here to get back home

How to register a WDS protocol handler

 HomeNewsGroups | Search | About
 microsoft.public.msn.search    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
How to register a WDS protocol handler Martin Koppmann 03-14-2006
Posted by Martin Koppmann on March 14, 2006, 6:37 am
Please log in for more thread options
Hello,

I am triyng to implement a WDS protocol handler according
http://addins.msn.com/devguide.aspx

The document says:
"After the protocol handler is registered, use the AddDefaultUrl method in
the ISearchCrawlScopeManager interface to set default crawling rules to
include and exclude particular URLs and child URLsThe method is as follows:

HRESULT AddDefaultUrl(LPCWSTR pszUrl, BOOL fInclude);"

How do I get a reference to a SearchCrawlScopeManager object to call this
method? It is not instancable? Do I need to implement it?

Thanks for any advise!

Martin

Posted by Ivaylo Bakalov on March 14, 2006, 10:48 am
Please log in for more thread options
Hello Martin,

You will have to implement ISearchProtocolOptions along with ISearchProtocol.

WDS is supposed to call your ISearchProtocolOptions::GetDefaultCrawlScope
implementation passing pointer to ISearchCrawlScopeManager.

Good luck.

Ivaylo

> Hello,
>
> I am triyng to implement a WDS protocol handler according
> http://addins.msn.com/devguide.aspx
>
> The document says:
> "After the protocol handler is registered, use the AddDefaultUrl
> method in
> the ISearchCrawlScopeManager interface to set default crawling rules
> to
> include and exclude particular URLs and child URLsThe method is as
> follows:
> HRESULT AddDefaultUrl(LPCWSTR pszUrl, BOOL fInclude);"
>
> How do I get a reference to a SearchCrawlScopeManager object to call
> this method? It is not instancable? Do I need to implement it?
>
> Thanks for any advise!
>
> Martin
>



Posted by Martin Koppmann on March 20, 2006, 11:20 am
Please log in for more thread options
Hello Ivaylo,

Thanks for your very helpful reply!

Meanwhile I have a working object implementing both ISearchProtocolOptions
and ISearchProtocol. After registering it gets instanced by WDS and I can
call AddDefaultUrl
The Url gets added and is visible under "WDS Options" (Browse...).

But neither ISearchProtocol_Init nor ISearchProtocol_CreateAccessor get
called. How does it continue? My IUrlAccessor object is implemented in a
different class.

Please give me a tip.

Thanks a lot.

Martin


"Ivaylo Bakalov" wrote:

> Hello Martin,
>
> You will have to implement ISearchProtocolOptions along with ISearchProtocol.
>
> WDS is supposed to call your ISearchProtocolOptions::GetDefaultCrawlScope
> implementation passing pointer to ISearchCrawlScopeManager.
>
> Good luck.
>
> Ivaylo
>
> > Hello,
> >
> > I am triyng to implement a WDS protocol handler according
> > http://addins.msn.com/devguide.aspx
> >
> > The document says:
> > "After the protocol handler is registered, use the AddDefaultUrl
> > method in
> > the ISearchCrawlScopeManager interface to set default crawling rules
> > to
> > include and exclude particular URLs and child URLsThe method is as
> > follows:
> > HRESULT AddDefaultUrl(LPCWSTR pszUrl, BOOL fInclude);"
> >
> > How do I get a reference to a SearchCrawlScopeManager object to call
> > this method? It is not instancable? Do I need to implement it?
> >
> > Thanks for any advise!
> >
> > Martin
> >
>
>
>

Posted by Ivaylo Bakalov on March 20, 2006, 2:38 pm
Please log in for more thread options
Hello Martin,

I wish the WDS documentation was more helpful. Try the following registry
entries:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell
Extensions\Approved]
"{Your ClSID}"="Windows Desktop Search Outlook Express ISearchFolder Class"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{Your
ClSID}]
@="Your PH Name"

[HKEY_CLASSES_ROOT\CLSID\{Your ClSID}\ShellFolder]
"Attributes"=dword:20180000

You should also implement IShellFolder on the Protocol object.
Check MSDN documentation on the topic of "Implementing the Basic Folder Object
Interfaces":

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_adv/namespaceextension/nse_impl.asp

Ivaylo




> Hello Ivaylo,
>
> Thanks for your very helpful reply!
>
> Meanwhile I have a working object implementing both
> ISearchProtocolOptions and ISearchProtocol. After registering it gets
> instanced by WDS and I can call AddDefaultUrl The Url gets added and
> is visible under "WDS Options" (Browse...).
>
> But neither ISearchProtocol_Init nor ISearchProtocol_CreateAccessor
> get called. How does it continue? My IUrlAccessor object is
> implemented in a different class.
>
> Please give me a tip.
>
> Thanks a lot.
>
> Martin
>
> "Ivaylo Bakalov" wrote:
>
>> Hello Martin,
>>
>> You will have to implement ISearchProtocolOptions along with
>> ISearchProtocol.
>>
>> WDS is supposed to call your
>> ISearchProtocolOptions::GetDefaultCrawlScope implementation passing
>> pointer to ISearchCrawlScopeManager.
>>
>> Good luck.
>>
>> Ivaylo
>>
>>> Hello,
>>>
>>> I am triyng to implement a WDS protocol handler according
>>> http://addins.msn.com/devguide.aspx
>>>
>>> The document says:
>>> "After the protocol handler is registered, use the AddDefaultUrl
>>> method in
>>> the ISearchCrawlScopeManager interface to set default crawling rules
>>> to
>>> include and exclude particular URLs and child URLsThe method is as
>>> follows:
>>> HRESULT AddDefaultUrl(LPCWSTR pszUrl, BOOL fInclude);"
>>> How do I get a reference to a SearchCrawlScopeManager object to call
>>> this method? It is not instancable? Do I need to implement it?
>>>
>>> Thanks for any advise!
>>>
>>> Martin
>>>



Posted by moonshotter on August 19, 2006, 9:31 pm
Please log in for more thread options
hi, Ivaylo:
would you tell me where to find the ISearchProtocolOptions?
i download the SPS_SDK_10, and only find the ISearchProtocol. many thanks!

weizhu

"Ivaylo Bakalov" wrote:

> Hello Martin,
>
> You will have to implement ISearchProtocolOptions along with ISearchProtocol.
>
> WDS is supposed to call your ISearchProtocolOptions::GetDefaultCrawlScope
> implementation passing pointer to ISearchCrawlScopeManager.
>
> Good luck.
>
> Ivaylo
>
> > Hello,
> >
> > I am triyng to implement a WDS protocol handler according
> > http://addins.msn.com/devguide.aspx
> >
> > The document says:
> > "After the protocol handler is registered, use the AddDefaultUrl
> > method in
> > the ISearchCrawlScopeManager interface to set default crawling rules
> > to
> > include and exclude particular URLs and child URLsThe method is as
> > follows:
> > HRESULT AddDefaultUrl(LPCWSTR pszUrl, BOOL fInclude);"
> >
> > How do I get a reference to a SearchCrawlScopeManager object to call
> > this method? It is not instancable? Do I need to implement it?
> >
> > Thanks for any advise!
> >
> > Martin
> >
>
>
>

Similar ThreadsPosted
How to register protocol handler WDS? Plus many more September 6, 2006, 10:37 am
How to register a WDS protocol handler March 1, 2007, 10:35 am
how to use protocol handler in WDS August 19, 2006, 9:47 pm
Protocol Handler - How do I call AddDefaultUrl()? August 31, 2005, 10:37 am
WDS Protocol Handler: Indexing does not start automatically April 25, 2006, 5:58 am
Implementing custom protocol handler(http) in WDS October 26, 2006, 5:48 am
How to test protocol handler written for MSN desktop search! March 6, 2006, 9:05 am
Sample Code for Protocol Handlers for Desktop Search August 17, 2005, 5:05 pm
Writing custom Protocol Handlers & IFilters for Windows Desktop Se August 29, 2005, 1:47 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap