function GetIniInt(const Section, Key: String; const Default, Min, Max: Longint; const Filename: String): Longint;
Reads a Longint from an INI file. If the Longint read is not between Min/Max then it returns Default. If Min=Max then Min/Max are ignored.