Windows C/C++ Drive Init/Partition/Format

别来无恙 提交于 2019-12-05 03:43:56

问题


I am trying to build an application for Windows XP 64bit which is able to detect drives of a particular model in the system, and if they are not initialized & formatted perform these processes.

I would also like to be able to query and set the partition information(including the volume label).

I have started putting together code using DeviceIoControl, but I have not been able to figure out how to set/get partition/volume labels or format drives with the method, I have got SMART access working.

Is there any other method that is any easier to use?

Zac


回答1:


Sounds like you are looking for Disk Management Control Codes.




回答2:


If I were doing this I would use my own code only to detect things. I would do the partitioning and formatting through diskpart and/or format commands instead. diskpart accepts file argument with a script to execute.



来源:https://stackoverflow.com/questions/3879294/windows-c-c-drive-init-partition-format

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!