UserFileSystemSamples
UserFileSystemSamples copied to clipboard
ShellExtension with COM surrogate
Hello, we’re trying to implement a virtual file system without certificate and sparse package manifest.
Syncronization of files and folders works fine.
We are not able to implement thumbnails and context menu as seen in the sample on your web site.
As the documentation says we’re using the registration inside the main app
Then we use ShellExtensionRegistrar.Register() for Com surrogate. the only diference are two parameters tha in the doc are missing (syncrootid and log)
ShellExtensionRegistrar.Register(SyncRootId, log);
by executing the software we see that thumbnails and context menu events are not handled in out handlers.
we’ve tryed to instantiate a local server within the app and run it on background but the events still fail to be managed
can you provide us some hints or an exemple without package, sparse package manifest and certificate?
Hello, please see the comment in the appxmanifest.xml file:
https://github.com/ITHit/UserFileSystemSamples/blob/ba0615824685696a59b1de34248c64e83e658276/Windows/VirtualDrive/VirtualDrive/SparsePackage/appxmanifest.xml#L62-L66
To run the VirtualDrive sample without an application identity, it should be built without the manifest. To do so, comment manifest definition in VirtualDrive.csproj.
There is a check in the VirtualDrive.Program class, that prevents direct registration of handlers when a process is running with package identity (there is another mechanism of registration, in that case, it is based on AUMID).
https://github.com/ITHit/UserFileSystemSamples/blob/ba0615824685696a59b1de34248c64e83e658276/Windows/VirtualDrive/VirtualDrive/Program.cs#L321-L324
Please, notice, that comment also mentions uncommenting the com:Extension section to register handlers in separate VirtualDrive.ShellExtension COM server. This is out-of-proc handlers scenario. In this case, VirtualDrive itself will be running without an application identity, but VirtualDrive.ShellExtension will, instead.
We will look into the possibility to run in-proc handlers scenario without an application identity.
We have just published a new version 6.0 that fixes an issue with running the Virtual Drive and WebDAV Drive samples without identity.
To run the sample app without identity you just need to comment-out the sparse package registration: https://github.com/ITHit/UserFileSystemSamples/blob/master/Windows/VirtualDrive/VirtualDrive/Program.cs#L103-L109
Please see the comment for the Program.cs here: https://github.com/ITHit/UserFileSystemSamples/blob/master/Windows/VirtualDrive/VirtualDrive/Program.cs#L25-L27