I have fixed that fatal error C1083: Cannot open include file: Mountmgr.h: No such file or directory by WDK installation

Thanks for the Answer dude ..

I am not able to know how to use the IOCTL_MOUNTMGR_QUERY_POINTS .

I have searched the internet and found some sample code to try with.

but i am not sure whether its correct or not....

can you please let me know how to use the IOCTL_MOUNTMGR_QUERY_POINTS to get the drive letter

Thank you for your time

below is my source coode

Qt Code:
  1. HANDLE hUsbDevice = CreateFile( pDetData->DevicePath,
  2. GENERIC_READ | GENERIC_WRITE,
  3. 0, NULL, OPEN_EXISTING, 0, NULL);
  4.  
  5. UCHAR Bytes[10000];
  6.  
  7. PMOUNTMGR_MOUNT_POINTS pMntPoints = (PMOUNTMGR_MOUNT_POINTS) Bytes;
  8.  
  9. MOUNTMGR_MOUNT_POINT mntPoint, *pmnt;
  10.  
  11. DWORD bytesReturned;
  12.  
  13. if (hUsbDevice == INVALID_HANDLE_VALUE)
  14. {
  15. qDebug()<<"CreateFile failed with error: %d\n"<<GetLastError();
  16.  
  17. }
  18. else
  19. {
  20. qDebug ()<<"VALID DEVICE";
  21.  
  22. BOOL status = DeviceIoControl( hUsbDevice,
  23. IOCTL_MOUNTMGR_QUERY_POINTS,
  24. &mntPoint,
  25. sizeof(MOUNTMGR_MOUNT_POINT),
  26. pMntPoints,
  27. 10000,
  28. &bytesReturned,
  29. NULL);
  30.  
  31. wprintf(L"\tBOOL VALUE : %d\n", status);
  32.  
  33. qDebug ()<<pMntPoints->MountPoints;
  34.  
  35. }
To copy to clipboard, switch view to plain text mode