function GetFileSize(const strFileName: String): Longint; var WFD: TWin32FindData; hFile: THandle; begin hFile := FindFirstFileA(PansiChar(strFileName), WFD); Result := WFD.nFileSizeLow; FindClose(hFile); end; 

does not accept this line:

  hFile := FindFirstFileA(PansiChar(strFileName), WFD); 

This type of error:

[DCC Error] Server.dpr(61): E2033 Types of actual and formal var parameters must be identical

Variables like correctly declared, have any thoughts?

    1 answer 1

    The FindFirstFileA function (ANSI option) requires a var parameter of type TWin32FindDataA (also ANSI!).

    You still have an error, but I will leave it as an exercise :-)