Matthew van Eerde's web log
I am a Software Development Engineer in Test working for the Windows Sound team. You can contact me via email: mateer at microsoft dot com
Friend key: 28904932216450_59cd9d55374be03d8167d37c8ff4196b
I wrote a selfhost tool which allows me to add a folder (for example, C:\music) to a shell library (for example, the Music library.)
This was before I found out about the shlib shell library sample which Raymond Chen blogged about. If you're looking for a sample on how to manipulate shell libraries, prefer that one to this.
CoInitializepShellLibrary = SHLoadLibraryFromKnownFolder(library GUID)SHAddFolderPathToLibrary(pShellLibrary, path)pShellLibrary->Commit()CoUninitialize
>shelllibraryshelllibrary add <path> to <library> <path> must already exist <library> must be one of: documents music pictures videos recorded tv>shelllibrary add C:\music to MusicAdded C:\music to Music library
Source and binaries attached.