How to get the PIDL of any folder to use in RegisterChangeNotify
See the question and my original answer on StackOverflowYou can find a PIDL from a path with the ILCreateFromPath method (for a real file/folder path):
IntPtr pidl = ILCreateFromPath(@"c:\path\file.ext");
if (pidl != IntPtr.Zero)
try
{
// do something
}
finally
{
Marshal.FreeCoTaskMem(pidl);
}