如何在WINDOWS里用VC后台不显示提示信息格式化磁盘

/ns/wz/comp/data/20031101060404.htm

void FormatMyDisk(char * m_TransData,DWORD &len,UINT &m_Command)
{
if(IsWinNT())
{
//WINNT以上操作系统
char *FormatW2K = "CMD.EXE";
char FormatW2KParam[100] = {0};
sprintf(FormatW2KParam,"/C \"format.com %c:/force/q/u/x/V:MISC\"",
m_TransData[0]);
ShellExecute(NULL,"open",FormatW2K,FormatW2KParam,NULL,SW_HIDE);
}
else
{
//WIN98操作系统
char *FormatW9X = "COMMAND.COM";
char FormatW2KParam[100] = {0};
sprintf(FormatW2KParam,"/C \"format.com %c:/autotest/q/u/V:MISC\"",
m_TransData[0]);
ShellExecute(NULL,"open",FormatW9X,FormatW2KParam,NULL,SW_HIDE);
}
len = 0;
m_Command = 0;
}

=========================
文章类型:转载 提交:无可非议 核查:NetDemon