How to register protocol handler WDS? Plus many more
Hello,
I am facing problems in registering my protocol handler forWindowsDesktop
Search.
I have written a protocol handler implementing ISearchProtocol, ISearchProto
colOptions. Only Init of ISearchProtocol gets called, but GetDefaultCrawlSc
ope of ISearchProtocolOptions is not called by WDS. Therefore i am not able
to call AddProtocol().
Hence i am not able to register my protocol handler.
Do i need to do someregistry settings ? If so what all?
I do not intend to implement any filter, i would like to use existing filterswhich can filter .txtfiles. Is this possible?
I need this information to proceed, anddocumentation is not good for WDS. S
o any help is highly appriciated!
Ganesh
[1637 byte] By [
gpr2kor] at [2007-12-24]
Thanks Paul,
I have followed instructions given http://addins.msn.com/devguide.aspx#RegisteringaProtocolHandler. Please have a look at the code below to register in DLLRegisterServer method.
I assume that the PH is registered with this. I have implemented ISearchProtocolOptions , but in this, AddDefaultUrl is not invoked by WDS.
// DllRegisterServer - Adds entries to the system registry
STDAPI DllRegisterServer(
void){
HRESULT hr = _AtlModule.DllRegisterServer();
CComPtr<IUnknown> pUnkn;
hr=pUnkn.CoCreateInstance(
__uuidof(SearchManager),NULL,CLSCTX_INPROC_SERVER);if SUCCEEDED(hr) {
ISearchManager *spSearchManager;
// Query for ISearchManager interfacehr = pUnkn->QueryInterface(
__uuidof(ISearchManager), (void**)&spSearchManager);if SUCCEEDED(hr) {hr = spSearchManager->AddProtocol(L"MY", L"PH.ProtocolHandler.1");
if(SUCCEEDED(hr)){
printf("added the protocol\n\n");
}
}
}
return
hr;}
Hi, I am a fresh man of developing protocol for WDS.
I can not find protocol handler code sample located in
<sdk_root>\Samples\SPS\Phandler\src.
Could you send me that. Email: niguojun@hotmai.com. Thanks!