一个例子,是VB的,变一下就行了<br><br>在Drive的参数中 "A:" = 0,类推。<br><br>Private Const SHFMT_ID_DEFAULT = &HFFFF& <br><br>Private Declare Function SHFormatDrive Lib "shell32.dll" (ByVal hWnd As Long, ByVal Drive As Long, fmtID As Long, Options As Long) As Long<br><br>Private Sub Command1_Click()<br>Dim lret As Long<br>lret = SHFormatDrive(Me.hWnd, 0, SHFMT_ID_DEFAULT, 0)<br>Select Case lret<br>Case -2<br>MsgBox "OK !"<br>Case -3<br>MsgBox "Cannot format a read only drive !"<br>End Select<br>End Sub<br>