C/Visual C - Formatear un gran favor

 
Vista:

Formatear un gran favor

Publicado por Llogui (2 intervenciones) el 21/05/2001 10:30:03
Por favor ayudenme con un programa en C, C++ para formatear un disquete. Yo intente con _biosdisc() pero creo que no la estoy usando bien.

Es mi ultima nota de estructura de datos II, y esta nota me ayudaria bastante.

Les agradezco mucho su colaboración.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Formatear un gran favor

Publicado por Mario (5 intervenciones) el 21/05/2001 16:45:07
Podrías utilizar el API de windows aprovechándote de esta función: SHFormatDrive()

Si quieres información sobre esta función o un ejemplo bájate el programa Api-guide (http://www.allapi.net/agnet/appdown.php)

Ejemplillo en VB:

Const SHFD_CAPACITY_DEFAULT = 0 ' default drive capacity
Const SHFD_CAPACITY_360 = 3 ' 360KB, applies to 5.25" drives only
Const SHFD_CAPACITY_720 = 5 ' 720KB, applies to 3.5" drives only
Const SHFD_FORMAT_QUICK = 0 ' quick format
Const SHFD_FORMAT_FULL = 1 ' full format
Const SHFD_FORMAT_SYSONLY = 2 ' copies system files only (Win95 Only!)
Private Declare Function SHFormatDrive Lib "shell32" (ByVal hwndOwner As Long, ByVal iDrive As Long, ByVal iCapacity As Long, ByVal iFormatType As Long) As Long
Private Sub Form_Load()
'iDrive = The drive number to format. Drive A=0, B=1 (if present, otherwise C=1), and so on.
SHFormatDrive Me.hwnd, 0, SHFD_CAPACITY_DEFAULT, SHFD_FORMAT_QUICK
End Sub

Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar