Error: [Error] Unit1. pas(32): Undeclared identifier: 'GetInetFile'

Good day to all! I ran into this problem on Delphi 7. Here is a piece of code:

procedure TForm1.Button1Click(Sender: TObject);

var FileOnNet, LocalFileName: string ;

 begin

     FileOnNet:='URL My';
       LocalFileName:='my.my';

       if GetInetFile(FileOnNet,LocalFileName)=True then
          ShowMessage('Download successful')
       else
          ShowMessage('Error in file download');
    end;

Here, and the problem of the compiler is as follows:

[Error] Unit1.pas(32): Undeclared identifier: 'GetInetFile'

What is the problem? In Uses, the module is enabled.

Author: Виталина, 2014-12-25

2 answers

You seem to have understood the essence of the error. Make sure that the exact module you need is connected in the USES section. Make sure that you have written the function name in the correct case. Also make sure that the function accepts exactly these parameters. Try holding down CTRL and clicking on the name.

 1
Author: AseN, 2014-12-25 14:55:26

You call the function GetInetFile, and it is not described anywhere. There are 2 options: either write the function yourself, or copy from where you copied the rest of the code. And USES has nothing to do with it.

 0
Author: Ravt Service, 2014-12-26 10:17:16