I implemented namespace extension using default shell view in Windows XP.
Everything works fine, but I want add barricade (A Description of Protected Folders - also applicable to Windows XP).
Is possible this using documented/undocumented functions (SFVM messages), or this feature is hard-coded ?
If you fill all data for your extension view yourself, then you can read contents of hidden (or any other) folders on your own and display them straightaway, or hide if it needs to.
Your extension uses its own namespace, which is not controlled by the built-in shell protection options.
P.S. Starting from Windows 7+ it should not be a problem.
Related
I'd like to show a shell namespace extension in the new (since Windows Vista) IFileOpenDialog and IFileSaveDialog.
These dialogs can apparently display a custom form like the built-in Homegroup screen:
On this form I'd like to show internal files stored in a database (with various other options).
My question is: is it possible to pass the files that the users selects on my custom form to the IFileOpenDialog?
And is it possible to let the user select a location in the database, then receive the files from the IFileSaveDialog and store them in the database?
Important! I understand that this would be possible if I implemented virtual folders and files with my shell namespace extension. But is it possible to have my own Form embedded into the shell and in the same time pass and receive files to/from the dialogs?
If it is possible, what methods do I need to implement in my shell extension to catch the dialog open/save events?
I need to write a thumbnail handler for all the files under a given folder. This folder is a mounting point for a virtual file system (using Callback File System), and the files are actually not present physically on the local machine (they're stored in the cloud), so if I let the default thumbnail handler do its work, it will try to download the whole files from the server... which is obviously not what I want.
But now I just realized that a thumbnail handler must be registered per file type:
Registration of a thumbnail handler is based on standard file associations.
(from the documentation)
I don't want to register it per file type, because I don't want to change the behavior for files that are not in my virtual folder. Is there a way for my handler to be called for all the files in my virtual folder, and only them?
I see two ways for you to go.
The simple way: Register your own thumbnail handler and let it work on all files. When you don't support IInitializeWithStream but only IInitializeWithItem or IInitializeWithFile you can check if the item/file is in your virtual file system. If so you can return a thumbnail and otherwise return an error.
The problem with this approach is that only one thumbnail provider can be registered per file type.
The hard way: You can write a shell namespace extension. These can be used to display virtual folders, which can be customized in many ways. This is another way to do what you already did using cbfs, but it is restricted to Explorer only. It would add another way to display your virtual folders.
The shell namespace extension will only work for it's own virtual folder. If you mapped your virtual folders to a drive letter and the user opens that drive in Explorer (and not the shell namespace extension's virtual folder), the user would see regular Explorer view of the files, not your shell namespace extension.
Also: Documentation for shell namespace extensions is a pain, there is not much available. I wrote my own shell namespace extension and every time my objects where queried for an IID I traced that and learned a bit more. I saw that my extension is queried for IID_IThumbnailHandlerFactory, I also saw IIDs like IID_IExtractIconA or IID_IContextMenu, but I did not see IID_IThumbnailProvider, nor did I see IID_IExtractImage. This suggests that you cannot have your own IThumbnailProvider directly attached to the objects you create for the virtual folder, but it could also be that I just missed to set some flag somewhere else so that Explorer does not even try to query me.
I have created a Fire Monkey HD app in Rad Studio xe2.I have created text file for windows in my application using AssignFile() method.Now I want to create text file for MAC OSx.How can I do it??
Delphi includes the System.IOUtils.TFile this is a record containing methods used to perform various operations on files, So to create a text file you can use the TFile.WriteAllText passing the content of the file directly or use the TFile.Create method that create a file and return a TFileStream. Also you can use the TFileStream class directly.
All the above methods works in Windows and OSX.
AssignFile is a seriously outdated function.
In modern (and cross platform) apps you should be using streams.
I want to use the windows OpenFileDialog class in C# to browse files for my application. I would then like the files to show up with previews in Windows' "thumbnails" view.
Is there a simple way to make this happen? I'm thinking there should be a way to encode the files so that Windows simply reads and displays the thumbnail information, even though it's an unsupported file type?
I know Windows Vista has a different interface (IThumbnailProvider as opposed to IExtractImage) than Windows XP, but I need it to work across platforms.
Thanks!
/ Jakob
You have to write a Shell Extension Handler Thumbnail Image Extractor. This is unmanaged c++ code that extracts the image from your custom filetype to display within explorer shell. You can find more about Shell Extension Handlers at the following link:
Creating Shell Extension Handlers
When a user puts in a CD and autoruns, I want to "browse" the CD but I want to do some extra processing of the disk contents. If I wanted to replace the ListView in windows explorer with one of my own, how would I start? What terms should I search for to find out how to do this. I want to get the treeview part that explorer provides, and all the shell interaction, I just want to hide the extra extension on the end of the file names (.pgp) and show the icons for the files as if they weren't encrypted.
I think your best option is use a Shell Namespace extension like the GMail Drive shell
see this links
An almost complete Namespace Extension Sample
Create Namespace Extensions for Windows Explorer with the .NET Framework
Tips in Writing Namespace Extensions (I) - Implements Subfolder
Tips in Writing Namespace Extensions (II) - Implement Create and Delete Object Operations
Bye.