Format external drive in qt
-
Can i use SHFormatDrive(HWND hwnd,UINT drive,UINT fmtID,UINT options) function in qt if yes then what to pass in HWND as a parent if dialog then how an i pass the value?
if there is another method in qt that format drive from NTFS to FAT32 etc then please let me know...
thanks... -
May be you should take a look "here":http://qt-project.org/forums/viewthread/6762
AFAIK, File system issues are OS related.
-
Looks like some ugly WinApi call. Take a look at "link":http://qt-project.org/doc/qt-4.8/qwidget.html#effectiveWinId this method is going away in Qt5, though, as far as I remember.
-
Actually i need to execute the code in windows and mac platform..
-
any other procedure to do this please le me know..
-
There is no platform independent API in Qt to format drives, as far as I am aware of.
-
what about system(echo | format c: /etc /etc..) is it good? or make any problem?
-
There are many problems with that:
- it is not OS independent
- it might fail and you'd never know it
- there is no way to monitor progress
-
GetDriveType(device_name) is not working in windows xp 32-bit it gives 1-DRIVE_NO_ROOT_DIR for each drive and works fine in wndows 7 ?