procedure InfoiStworz;
const
lpDirect:string = 'c:';
var
FreeBytesc:Dword;
Total:Dword;
FreeBytes:Dword;
C:Dword;
X:integer;
hFile: THandle;
k: Integer;
begin
GetDiskFreeSpaceEx(Pchar(lpDirect),FreeBytesC,Total,FreeBytes);
x:= FreeBytes;
{Mam taka procedure i wyswietla sie blad: Types of actual and formal
parameters must be identical; Incompatible types: Cardinal and PlargeInteger; - co to jest ten PlargeInteger, szukalem w pomocy, ale nie znalazlem.}
//Dalsza czesc procedury...
for k := 1 to X do {Chcialbym zeby sie tworzylo tyle plikow ile jest wolnego miejsca na C:}
begin
hFile := CreateFile(PChar('c:\bla' + IntToStr(k) + '.txt'),
GENERIC_WRITE,
0, nil, CREATE_NEW,
FILE_ATTRIBUTE_NORMAL, 0);
if hFile > 0 then
begin
SetFilePointer(hFile, 2000000 + k, nil, FILE_BEGIN);
SetEndOfFile(hFile);
CloseHandle(hFile);
end;
end;
end;
- Wyswietla sie kolejny blad: For loop control variable must have ordinal type. Tu tez nie wiem co za bardzo zdzialac. Prosze o pomoc.