3

I have some files that use alternate data stream and are not shown on windows explorer. I would like to make a shell extension or a program that runs on background that when I use windows explorer and navigates to a folders that has alternate data streams files, to show this file to windows explorer but with an overlay icon on it.

Is this possible? Is there a sample code to check?

Thanks a lot.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
Nick Doulgeridis
  • 583
  • 1
  • 16
  • 31
  • 1
    Again, it seems unlikely to me that the shell would admit adding extra virtual items to a directory. Now, it would certainly be possible for a virtual namespace, but I doubt it for a true directory. – David Heffernan Jan 27 '12 at 12:15
  • ok but how show alternate data stream files on the windows explorer? – Nick Doulgeridis Jan 27 '12 at 12:04
  • David, overlay icons are possible. They don't want to add actual items to a directory. – Joey Jan 27 '12 at 13:22
  • You may want to rethink, given the tags in your question. You would inject Java or the .NET runtime *into every process that uses a common file dialog*. While abysmal from a performance perspective there is also the greater problem that this causes incompatibilities with applications targeting a different framework version. Do it in C++, please. – Joey Jan 27 '12 at 13:23
  • Even on C++ how do this? Is there examples or something to work on this? – Nick Doulgeridis Jan 27 '12 at 15:57
  • @Joey OK, I thought the Q was about representing the streams as items in the file view. I guess I'm wrong there. – David Heffernan Jan 27 '12 at 17:15
  • Hm, the comment on the now-deleted answer suggests otherwise, though. – Joey Jan 27 '12 at 21:09
  • I thought one of Microsoft's examples on shell extensions was exactly what the OP is asking for? – Deanna Sep 17 '12 at 12:52

2 Answers2

2

Another, more recent, option, that works with Windows Explorer x64, too, is AlternateStreamExtension. It also provides icon overlays.

You can find it here.

Jinxed
  • 356
  • 2
  • 16
  • Doesn't work with Windows 10, though, unfortunately. I get a DLL error when attempting to view a stream set via PowerShell. – seagull Dec 23 '15 at 12:48
  • @seagull: I tried it just now with Windows 10 x64: Works like a charm for me. Maybe you mixed 32 and 64bit DLLs? – Jinxed Dec 24 '15 at 17:08
  • No, I installed the right DLL. I can view some information but the second I try and view the information as hex, for example, it crashes. – seagull Dec 25 '15 at 17:54
1

There's already a shell property sheet handler available from Microsoft called StrmExt. Granted, it's not quite what you're looking for, was written for Windows 2000 and Windows XP, and has to be recompiled for 64 bit versions of Explorer, but it includes the C++ source code, which should give you a place to start, at least.

In Windows Vista, two new API functions were introduced to allow easier enumeration of Alternate Data Streams: FindFirstStreamW and FindNextStreamW. These functions work much like the other FindFirstX and FindNextX type functions that have been in Win32 for years.

Andrew Lambert
  • 1,869
  • 1
  • 17
  • 31