Sky Software Homepage LogicNP Software Knowledge Base And FAQ

 
Contact Product Support    SearchSearch      Subscribe to the RSS feed for this forum

INFO: Developing protocol handlers with EZNamespaceExtensions.Net

 
Subscribe to the RSS feed for this forum  Forum Index -> EZNamespaceExtensions.Net
View previous topic :: View next topic  
Author Message
atul
Site Admin


Joined: 18 Jul 2005
Posts: 8

Posted: Tue Aug 12, 2008 9:16 am    Post subject: INFO: Developing protocol handlers with EZNamespaceExtensions.Net

Protocol handlers are a special type of namespace extension which can be accessed using protocol URL such as "protocol://path". For example, the Registry Browser sample that comes with EZNamespaceExtensions.Net registers itself as a handler for the "reg" protocol, so it can be accessed from Windows Explorer or Internet Explorer using strings such as "reg://HKEY_CURRENT_USER".

To develop a namespace extension, the following steps must be completed in code :

* In the GetNSETargetInfo (or GetNSETargetInfoEx in case namespace extension is to be registered for multiple targets/protocols) method, set the Target property of NSETargetInfo to NSETarget.ProtocolHandler and set the Protocol property of NSETargetInfo to the desired protocol (eg : "reg").

* Override the NSEFolder.GetChildFromDisplayNameEx method in the class representing the root folder of the namespace extension and return the correct child for the passed protocol string. The RegistryBrowser sample strips the protocol part ("reg://") of the passed string and simply calls the base implementation of GetChildFromDisplayNameEx to allow it to return the correct child.

* Override the NSEFolder.GetDisplayNameEx method and for the case when a parsing display name is requested (DisplayNameFlags.ForParsing), return the exact same string as the protocol path of the folder. Thus, the child returned for a particular protocol string from the GetChildFromDisplayNameEx method should have the exact same protocol string as its parsing name. In the RegistryBrowser sample, a protocol string such as "reg://HKEY_CURRENT_USER" returns the folder corresponding to the "HKEY_CURRENT_USER" key. When this folder is requested for its parsing name, it returns the same protocol string : "reg://HKEY_CURRENT_USER".
Back to top
Display posts from previous:   
Forum Index -> EZNamespaceExtensions.Net All times are GMT
Page 1 of 1

 
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group