Delphi Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
델파이 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
FreePascal/Lazarus
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
델마당
볼랜드포럼 광고 모집

델파이 Q&A
Delphi Programming Q&A
[2917] [답변] SEADAE/ 델파이로 디스크 포맷방법 아시면..
grcsb [ ] 1192 읽음    1998-05-22 07:59

소스만 올리겠습니다..
그럼 도움이 되시기를..

From 류..

* 소스
const SHFMT_DRV_A = 0;
const SHFMT_DRV_B = 1;

const SHFMT_ID_DEFAULT = $FFFF;

const SHFMT_OPT_QUICKFORMAT = 0;
const SHFMT_OPT_FULLFORMAT = 1;
const SHFMT_OPT_SYSONLY = 2;

const SHFMT_ERROR = -1;
const SHFMT_CANCEL = -2;
const SHFMT_NOFORMAT = -3;

function SHFormatDrive(hWnd : HWND;
                       Drive : Word;
                       fmtID : Word;
                       Options : Word) : Longint
   stdcall; external 'Shell32.dll' name 'SHFormatDrive';

procedure TForm1.Button1Click(Sender: TObject);
var
  FmtRes : longint;
begin
  try
    FmtRes:= ShFormatDrive(Handle,
                           SHFMT_DRV_A,
                           SHFMT_ID_DEFAULT,
                           SHFMT_OPT_QUICKFORMAT);
    case FmtRes  of
     SHFMT_ERROR : ShowMessage('Error formatting the drive');
     SHFMT_CANCEL :
       ShowMessage('User canceled formatting the drive');
     SHFMT_NOFORMAT : ShowMessage('No Format')
    else
     ShowMessage('Disk has been formatted');
    end;
  except
  end;

end



+ -

관련 글 리스트
2917 [답변] SEADAE/ 델파이로 디스크 포맷방법 아시면.. grcsb 1192 1998/05/22
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.