function funIPtoInteger(str: string): int64; stdcall;
var intDotCount: integer;
strSec: array[1..4] of string;
i: integer;
begin
i := 0;
intDotCount := 0;
for i := 0 to length(str) - 1 do
begin
if str[i] = '.' then
intDotCount := intDotCount + 1;
end;
if intDotCount - 3 <> 0 then Result := 0;
for i := 1 to 3 do
begin
strSec[i] := Copy(str, 0, Pos('.', str) - 1);
str := Copy(str, Pos('.', str) + 1, length(str) - 1);
end;
strSec[4] := str;
for i := 1 to 4 do
begin
strSec[i] := funLeftFill(strSec[i], 3);