title: How should I read the filename in FILE_NOTIFY_INFORMATION struct
body: <p>I'm trying to monitor file changes but I am not really sure on how to read the filename in the FILE_NOTIFY_INFORMATION struct:</p>
  
  <pre><code>    HANDLE dwChangeHandles[2];
      DWORD dwWaitStatus;
      wChangeHandles[0] = FindFirstChangeNotification(dirname.c_str(), FALSE, FILE_NOTIFY_CHANGE_LAST_WRITE);
      if (dwChangeHandles[0] == INVALID_HANDLE_VALUE) printerr(__FILE__,__LINE__,"FindFirstChangeNotification function failed.\n");
      ...
      if ((dwChangeHandles[0] == NULL) || (dwChangeHandles[1] == NULL))  //final validation
          printerr(__FILE__,__LINE__,"Unexpected NULL from FindFirstChangeNotification.\n");
  
      while (TRUE) {
          std::cout &lt;&lt; "Waiting for notification...\n";
          dwWaitStatus = WaitForMultipleObjects(2, dwChangeHandles, FALSE, INFINITE);
          if(dwWaitStatus==WAIT_OBJECT_0){
              std::cout &lt;&lt; "Something changed\n";
  
              DWORD BytesReturned;
              size_t bufLen = 1024;
              FILE_NOTIFY_INFORMATION buffer[bufLen];
              if (ReadDirectoryChangesW(dwChangeHandles[0], buffer, bufLen, FALSE, FILE_NOTIFY_CHANGE_LAST_WRITE, &amp;BytesReturned, NULL, NULL)){
                  std::wcout &lt;&lt; std::wstring(buffer-&gt;FileName)&lt;&lt; std::endl; //THERE IS NOTHING IN THE EXPECTED OUTPUT HERE
              }
              if (FindNextChangeNotification(dwChangeHandles[0]) == FALSE ) printerr(__FILE__,__LINE__,"FindNextChangeNotification function failed.\n");
          }
  
          else if(dwWaitStatus==WAIT_TIMEOUT) printerr(__FILE__,__LINE__,"No changes in the timeout period.\n");
          else printerr(__FILE__,__LINE__,"Unhandled dwWaitStatus.\n");
      }
  </code></pre>
  
  <p>Is there something I am doing wrong</p>