Sky Software Homepage LogicNP Software Knowledge Base And FAQ

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

INFO: You get an 'Unknown Error' message when you try to save a file to your namespace extension on Vista or later

 
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: Tue Oct 20, 2009 5:47 am    Post subject: INFO: You get an 'Unknown Error' message when you try to save a file to your namespace extension on Vista or later

The solution is to implement the CNSEFolder.GetChildFromDisplayName function on the folder class(es) where you are trying to save as follows (taken from the FileSystemBrowser sample):

Code:
// The GetChildFromDisplayName function is called to retrieve the item from
// its display name. If the e.AssumeChildExists parameter is true, the child with the
// specified display name should be assumed to in existence and an item representing
// that display name should be returned.
CNSEItem* CFolderItem::GetChildFromDisplayName(CGetChildFromDisplayNameEventArgs& e)
{
   if(e.assumeChildExists)
   {
      return new CFileItem(this->fullPath, e.displayName);
   }
   else
   {
      // Return only if file truly exists
      if(FileExists(PathCombineNSE(this->fullPath,e.displayName)))
      {
         return new CFileItem(this->fullPath, e.displayName);
      }
      else if (DirectoryExists(PathCombineNSE(this->fullPath, e.displayName)))
      {
         return new CFolderItem(this->fullPath, e.displayName);
      }
   }
   return NULL;
}
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