Sky Software Homepage LogicNP Software Knowledge Base And FAQ

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

HOWTO: Reference the root folder of the namespace extension from a context menu extension or property sheet extension.

 
Subscribe to the RSS feed for this forum  Forum Index -> EZNamespaceExtensionsMFC
View previous topic :: View next topic  
Author Message
Support



Joined: 18 Jul 2005
Posts: 731

Posted: Sat Jul 12, 2008 8:17 am    Post subject: HOWTO: Reference the root folder of the namespace extension from a context menu extension or property sheet extension.

It is possible to develop a context menu extension or a property sheet extension targeted at the root folder of the namespace extension, as described in http://www.ssware.com/support/viewtopic.php?t=374 and http://www.ssware.com/support/viewtopic.php?t=375

To reference the root folder from the extension, use the following code :

[C++]

// Create a new instance of the root folder of your namespace extension
CFolderItem* f = new CFolderItem() ;
/*
In the below line, "\xff\x37\x51\x93" is the signature and is required. "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}" is the CLSID of 'My Computer' and is required only if the namespace extension is situated under 'My Computer'. If it is situated under the 'Desktop' it is not required; if it is under 'My Network Places', use the CLSID of that instead. Finally, "::{3D09305B-E854-4f0a-880D-DF4A013B8F20}" is the CLSID of your namespace extension as applied to the CNSEFolder derived class representing the root folder of your namespace extension.
*/

char path[200];
// Start with signature
strcpy(path,"\xff\x37\x51\x93");
*(path +4) =0;
*(path +5) =0;

// Append path
wcscat((LPWSTR)path,
L"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{3D09305B-E854-4f0a-880D-DF4A013B8F20}");

// Initialize the 'root folder' with its full path
f->Initialize((LPCITEMIDLIST)path);

// After the 'root folder is initialized, it can be used as normal. For example :
f->RefreshView();
f->NotifyUpdated();
Back to top
Display posts from previous:   
Forum Index -> EZNamespaceExtensionsMFC All times are GMT
Page 1 of 1

 
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group