I want to create a namespace shell extension which allows users to browse content of my archives directly in Windows Explorer (like zip files). I have some experience in creation of NSE and it is not problem for me to implement all nessesary interfaces. The only thing I dont understand how to register such NSE in Windows registry. And how can I force Explorer to open my archive programmatically from context menu shell extension (in new or in the same window).
UPDATE
I examined .zip registry keys and tried to register my NSE with the same way.
My extension is .0003. I created the following keys:
[HKEY_CLASSES_ROOT\.0003]
@="TCIntegrationPack.64.TWCXNamespace"
[HKEY_CLASSES_ROOT\TCIntegrationPack.64.TWCXNamespace]
@="test only"
[HKEY_CLASSES_ROOT\TCIntegrationPack.64.TWCXNamespace\CLSID]
@="{B1BE3C6B-25E2-47DE-8AB9-878FCA3CD01A}"
[HKEY_CLASSES_ROOT\TCIntegrationPack.64.TWCXNamespace\Shell]
[HKEY_CLASSES_ROOT\TCIntegrationPack.64.TWCXNamespace\Shell\open]
"MultiSelectMode"="Document"
[HKEY_CLASSES_ROOT\TCIntegrationPack.64.TWCXNamespace\Shell\open\Command]
@="%SystemRoot%\\Explorer.exe /idlist,%I,%L"
"DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"
[HKEY_CLASSES_ROOT\CLSID\{B1BE3C6B-25E2-47DE-8AB9-878FCA3CD01A}]
@="TCIntegrationPack.64.TWCXNamespace"
[HKEY_CLASSES_ROOT\CLSID\{B1BE3C6B-25E2-47DE-8AB9-878FCA3CD01A}\InprocServer32]
@="F:\\Delphi\\Projects\\TCIntegrationPack\\Win64\\Debug\\TCIntegrationPack.64.dll"
"ThreadingModel"="Apartment"
[HKEY_CLASSES_ROOT\CLSID\{B1BE3C6B-25E2-47DE-8AB9-878FCA3CD01A}\ShellFolder]
"Attributes"=dword:08000000
For testing I run the following command:
explorer.exe /root,{B1BE3C6B-25E2-47DE-8AB9-878FCA3CD01A},"f:\1.0003"
And I see in logs the following:
TWCXNamespaceRootFolder is created
TWCXNamespaceRootFolder.QueryInterface IShellFolder out Result=S_OK
TWCXNamespaceRootFolder.IShellFolder.BindToObject started
TWCXNamespaceRootFolder.IShellFolder.BindToObject in AItemIDList=F:\
TWCXNamespaceRootFolder.IShellFolder.BindToObject in AReserved=0000000000000000
TWCXNamespaceRootFolder.IShellFolder.BindToObject in AIID=IShellFolder
TWCXNamespaceRootFolder.IShellFolder.BindToObject out Result=E_NOTIMPL
TWCXNamespaceRootFolder.IShellFolder.BindToObject finished
TWCXNamespaceRootFolder is destroyed
Shell request IShellFolder interface of parent folder of my file. Is it normal? Where is my mistake?
UPDATE 2
The problem is solved. It is necessary to add additional registry key
HKCR\CLSID\{extension CLSID}\Implemented Categories\{00021490-0000-0000-C000-000000000046}
After this Explorer uses my extension correctly. Some detains can be found here.