I have a C++/CLI application which needs to format a partition (single drive letter in Windows XP Embedded).
Is there any other way to do this besides launching the standard windows format program? ..or is that my best option?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should be able to do this by making use of the DeviceIoControl function.
Depending on what you’re trying to achieve, the following control codes seem relevant:
For completeness, it’s also worth being aware of other options, though probably won’t work on XP embedded:
For Vista/Windows Server 2003 (and above), the IVdsVolumeMF COM interface provides a Format method.
Also for Windows Server 2003 (and above), the Win32_Volume WMI Class also has a Format method.