Windows C/C++驱动器初始化/分区/格式化
我正在尝试为 Windows XP 64 位构建一个应用程序,它能够检测系统中特定型号的驱动器,如果它们未初始化&格式化执行这些过程。
我还希望能够查询和设置分区信息(包括卷标)。
我已经开始使用 DeviceIoControl 编写代码,但我无法弄清楚如何使用该方法设置/获取分区/卷标签或格式化驱动器,我已经使 SMART 访问正常工作。
还有其他更容易使用的方法吗?
扎克
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果我这样做,我只会使用自己的代码来检测事物。我将通过
diskpart
和/或format
命令进行分区和格式化。diskpart
接受带有要执行的脚本的文件参数。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/orformat
commands instead.diskpart
accepts file argument with a script to execute.听起来您正在寻找磁盘管理控制代码。
Sounds like you are looking for Disk Management Control Codes.