Windows shell extension to mark arbitrary files as 'watched'
0BSD License
A Windows shell extension to mark files with a 'watched' icon, and a utility program to automatically mark things as watched by polling the recently played list of VLC media player.
Note: This is mostly to scratch my own itch, and to learn a bit about using COM from Zig. I have no real plans for this becoming anything more generally useful.
install.bat
as Administrator (right click -> Run as administrator)explorer.exe
, or log out/log back in, or restart your computeruninstall.bat
of your existing version as Administrator (right click -> Run as administrator)explorer.exe
, or log out/log back in, or restart your computerinstall.bat
as Administrator (right click -> Run as administrator)explorer.exe
, or log out/log back in, or restart your computerNote: Last tested with Zig 0.14.0-dev.673+390c7d84b
. Pull requests that fix the build for latest master version of Zig are always welcome.
zig build dist
zig-out/dist
Note that, by default, zig build dist
will build everything in debug mode and use all the features of your current CPU (so it may not work on other computers). To make a more portable and faster build, you can use something like zig build dist -Doptimize=ReleaseSafe -Dcpu=x86_64
instead. If targeting versions of Windows older than 8, then -Dsingle-threaded
should be used to avoid a dependency on RtlWaitOnAddress
.
DllGetClassObject
, which is used to provide IClassFactory
s for our registered CLSID
s. Also exports DllRegisterServer
/DllUnregisterServer
for integration with regsvr32
IClassFactory
implementation, which is used to allocate our registered IShellIconOverlayIdentifier
and IContextMenu
implementationsIShellIconOverlayIdentifier
implementation, which is used to determine which items to put an icon overlay onIContextMenu
implementation, which is used to add our menu item to the right click context menu