🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3493

Re: Format FAT a Memory Cart

#3493
From: Babak
Date: Mon, 05 Jun 2006 18:42
42 lines
2211 bytes
yes thanks a milion :-)
//=========
extern "C" DWORD WINAPI SHFormatDrive(HWND, UINT, UINT, UINT);
void __fastcall TForm1::Button1Click(TObject *Sender)
{
//   ShowMessage(DriveComboBox1->Drive-'a');
  long FmtRes;
  try{
      FmtRes=
SHFormatDrive(Handle,DriveComboBox1->Drive-'a',SHFMT_ID_DEFAULT,SHFMT_OPT_QU
ICKFORMAT);
   switch(FmtRes){
      case SHFMT_ERROR   : ShowMessage("Format Problem...");break;
      case SHFMT_CANCEL  : ShowMessage("Canceled");break;
      case SHFMT_NOFORMAT : ShowMessage("Not Done !!!");break;
      default:ShowMessage("Done !!!!");
    }//sw
   }catch(...){};

}



"Michel Leunen" <nospam@noreply.please> wrote in message
news:4479778c$1@newsgroups.borland.com...
> Babak wrote:
>
> > How can I format a drive FAT? (Not a FAT32)
> > Is Memory Cart is differetnt with other kind of drives?
>
> Did you try SHFormatDrive() from the windows shell API?
> Basically, it opens the format dialog box allowing you to select the
> filesystem.
>
> Michel
> --
> ----------------------------------------
> Michel Leunen
> mailto: see my homepage.
> C++Builder, BCC5.5.1 Web site:
> http://www.leunen.com/
> ----------------------------------------
Technical Details
Message-ID: <44849fa3@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.inode.at!reader.uucp.at!feeder02.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail
References: <44784b78@newsgroups.borland.com> <4479778c$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,c5f7ed7023951f2f
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Babak" <I@afraid.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <44784b78@newsgroups.borland.com> <4479778c$1@newsgroups.borland.com>
Subject: Re: Format FAT a Memory Cart
Date: Mon, 5 Jun 2006 23:12:55 +0430
Lines: 44
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2479.0006
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2479.0006
NNTP-Posting-Host: 85.185.142.56
Message-ID: <44849fa3@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1149542307 85.185.142.56 (5 Jun 2006 14:18:27 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.inode.at!reader.uucp.at!feeder02.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail