title: DeviceIoControl GetLastError 87 (ERROR_INVALID_PARAMETER)
body: <p>This code is perfectly fine when launched on Windows 7:</p>
  
  <pre><code>HANDLE hVol = CreateFile(L"\\\\.\\c:", GENERIC_WRITE | GENERIC_READ, 
                           FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
  // hVol is always successful (both of Win7 and 10), I double-checked
  BYTE pData[sizeof(DWORDLONG) + 0x10000];
  DWORD cb;
  MFT_ENUM_DATA med;
  med.StartFileReferenceNumber = 0;
  med.LowUsn = 0;
  med.HighUsn = MAXLONGLONG;
  DeviceIoControl(hVol, FSCTL_ENUM_USN_DATA, &amp;med, sizeof(med), pData, sizeof(pData), &amp;cb, NULL);
  err = GetLastError();
  </code></pre>
  
  <p>but I get error 87 (<a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa364563(v=vs.85).aspx" rel="nofollow noreferrer">ERROR_INVALID_PARAMETER</a>) when running it on Windows 10. <strong>What could be the reason?</strong></p>