我怎样才能以编程方式运行格式化磁盘? [英] How I could to run formatting disk programmatically?

查看:148
本文介绍了我怎样才能以编程方式运行格式化磁盘?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以编程方式搜索变体以格式化硬盘或USB磁盘。我创建了api函数 SHFormatDrive ,但是在这里使用了windows-dialog。在我看来,这种方法不错,但我怎么能隐藏/禁止这个对话框。在任何地方,我继续搜索一种方式来以编程方式格式化磁盘。 使用Win32_Volume类的Format方法。 详情请点击


I search variants to format hard or usb disks programmatically. I founded api-function SHFormatDrive, but here use windows-dialog. To my mind, this method not bad, but how i could to hide/forbid this dialog. Anywhere, i continue search a way to format disks programmatically.

解决方案

Use the Format method of the Win32_Volume class. Details here.

这篇关于我怎样才能以编程方式运行格式化磁盘?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆