title: How to call SHChangeNotify from C# without error 14007
body: <p>I'm writing code that can update files (how uncommon and exciting !). When a file has been updated I need Windows Explorer to call the overlay extensions again, so that I always have the correct overlays over files. I figured I would do this with some p/invoke trickery (looking how TortoiseSVN is doing it), but I always get error 14007 and cant' find why. This is the code : </p>
  
  <pre><code>IntPtr ptr = Marshal.StringToHGlobalUni(FullName);
  Shell.SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_PATH | SHCNF_FLUSH, ptr, IntPtr.Zero);
  Win32Exception w = new Win32Exception(Marshal.GetLastWin32Error());
  LOG.ErrorFormat("Error {0} calling SHChangeNotify : {1}", w.NativeErrorCode, w.Message);
  Marshal.FreeHGlobal(ptr)
  </code></pre>
  
  <p>Fullname is the path of the file that's been updated. I get the following error : </p>
  
  <pre><code>Error 14007 calling SHChangeNotify : The requested lookup key was not found in any active activation context
  </code></pre>
  
  <p>What am I doing wrong here ?</p>
  
  <p>FYI : </p>
  
  <pre><code>[DllImport("Shell32.dll", CharSet=CharSet.Auto, SetLastError=true)]
  public static extern void SHChangeNotify(HChangeNotifyEventID wEventId, HChangeNotifyFlags uFlags, IntPtr dwItem1, IntPtr dwItem2);
  
  SHCNE_UPDATEITEM = 0x00002000
  SHCNF_PATH = SHCNF_PATHW = 0x0005
  SHCNF_FLUSH = 0x1000
  </code></pre>