Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Fri, 17 Feb 2006 14:00:23 +0000,    group: microsoft.public.inetsdk.programming.urlmonikers        back       


IInternetSession::RegisterNameSpace   
I have created a test implementation of IInternetProtocol class, and 
want to register temporary pluggable namespace handler for my program.

How do I create a CLSID and bind my class fileInternetProtocol to CLSID, 
and ultimately to IClassFactory, so I can register my class with 
IInternetSession::RegisterNameSpace?

I use Borland C++ Builder 6, without ATL, MFC nor VCL. So far I have the 
following: fileInternetProtocol - a test implementation of 
IInternetProtocol, and a web browser object which works fine. Everything 
I saw so far was using ATL and this is what I would like to avoid.

class fileInternetProtocol : public IInternetProtocol
{
....
     public:
     STDMETHODIMP Start(LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink,
         IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR 
dwReserved);
....
     STDMETHODIMP Read(void *pv, ULONG cb, ULONG *pcbRead);
....
};

What I am stuck with is how do I bind a CLSID to the 
fileInternetProtocol class and pass everything to RegisterNameSpace() 
correctly.

Any help is appreciated.

Thanks, Ivan.
date: Fri, 17 Feb 2006 14:00:23 +0000   author:   Ivan Glinka

Re: IInternetSession::RegisterNameSpace   
Ivan Glinka  wrote:
> I have created a test implementation of IInternetProtocol class, and
> want to register temporary pluggable namespace handler for my program.
>
> How do I create a CLSID and bind my class fileInternetProtocol to
> CLSID, and ultimately to IClassFactory, so I can register my class
> with IInternetSession::RegisterNameSpace?

You generate an arbitrary new CLSID, say with GuidGen. You implement a 
class factory object capable of creating instances of your protocol 
handler. You call RegisterNameSpace passing the class factory pointer, 
the CLSID you generated, and the URL scheme your protocol supports.
-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925
date: Fri, 17 Feb 2006 10:15:32 -0500   author:   Igor Tandetnik

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us