I'm trying to do something similar. I have a NSE that is populated with virtual items retrieved from a web service. I would like to use the empty folder text to display an error indicating why no objects were found (authentication failed, connection problem, etc.)
So far I've found that I can use the object created by SHCreateShellFolderView() to get an IFolderView2 pointer using QueryInterface. I have successfully done that to set the empty folder text immediately after creating the view (while I still have the view pointer).
It looks like I could to the same thing after a command is invoked using the "site" object.
In my case I need the view object available in the IShellFolder::EnumObjects() method. I don't know what the text needs to be until I've tried to fetch the folder contents from the web service.
Can anyone show me how to obtain a pointer to the view object from EnumObjects()?