[Formatting] How to format a drive by program

Résolu
I need to automatize the formatting of USB Flash Disks, under Windows XP Pro SP2, and running a program written with Visual C++ 6.0 .

I tryed by calling the "Format" system command, but this is a console application, and the returned status is not clear enougth. I need to know exactly what happen in case of fail.

How can I do?
Configuration: Windows XP pro
VC++ 6.0

6 réponses

  • Votes
  • Date
  • Date décroissante
  1. Contributeur
    Le monsieur voudrait savoir comment faire pour :
    formatter un disque de type clef USB via un programme écrit en C++. Il a tenté de passer par la commande externe 'format' du système et donc de prendre la valeur retournée par la commande.
    Seulement voilà, le retour n'est pas assez explicite et il voudrait savoir notamment quelle est la source d'erreur dans le cas ou la commande s'est mal déroulée.
    1. Modérateur
      J'avais bien compris, mais je croyais que le forum était francophone...

      Pis j'avais pas bien vu les bonjour et merci, mais ça doit venir de moi !
      1. Modérateur
        Pis j'avais pas bien vu les bonjour et merci, mais ça doit venir de moi !
        Pfffffffffffff t'es vraiment nul en anglais toi ;-DDDDDD
      2. Modérateur
        @jipicyDerme alors ! j'ai pourtant eu 16 sur 20 à mon épreuve de BTS..
    2. hi,
      first step : hello everybody
      second step : speak french (this is a french forum)
      third step : thanks all
      (this is a french translation of previous post) :-)
      @++
      -------------------------------------------------------------------------
      if a train station is where the train stops, what is a workstation ?
      1. Modérateur
        Ciao,
        prima tappa : buongiorno a tutti
        seconda tappa : parlare francese (è una tribuna francese)
        terza tappa : grazie a tutti
        (è una traduzione del messaggio precedente) :-)

        Se la stazione è dove si ferma il treno, cos'è una stazione di lavoro ?
    3. ciao Blux, vedo che parli italiano. Avendo io messo tutti i saluti e i ringraziamenti che ti piacono, potresti tu andare a vedere la mia domanda perché non ce la faccio più? Ti ringrazio.
      Huguen.
      1. Modérateur
        Non ho l'abitudine di rispondere a quelle domande...
        Vado a vedere se mi piace :-)
    4. Here is a solution
      http://www.sysinternals.com/SourceCode/fmifs.html

      Voici une solution
      http://www.sysinternals.com/SourceCode/fmifs.html