| This is a very small component
(code wise anyway). There are only two routines. Please read
the credits and
copyright information.
IP2C_IMPORT_DATA(Document)
| Parameter |
Type |
Description |
| Document |
Text |
Full path of document containing
the IP 2 Country Data. This is an optional parameter.
If omitted the open file dialog will be displayed to
select the data file. |
Description
This method is provided for loading and updating the IP 2
Country data file.
IP2C_GetCountryFromIP(IPAddress;CntryCode2;CntryCode3;CntryName)
->Real
| Parameter |
Type |
Description |
| IP Address |
String |
IP Address in string format "10.0.1.1" |
| Country Code (2) |
Pointer |
A pointer to a 2char long string to
contain the ISO3166 2 character country code. |
| Country Code (3) |
Pointer |
A pointer to a 3 char long string to
contain the ISO3166 3 character country code. |
| Country Name |
Pointer |
A pointer to a 40 char long string
to contain the ISO3166 country name. |
| |
|
|
| Function Result |
Real |
Error code of -1 or the
IP Address converted to number format. |
Description
If passed a valid IP address, in string format "10.0.1.1",
this function will set the variables passed as pointers, the
country code in both 2 character and 3 character formats along
with the Country name.
The return value will be -1 if the address is not found in
the IP2Address data file, otherwise it will be set to the
IP address in number format.
| Error Code |
Description |
| -1 |
IP Address not found in
the IP2C Database. |
© Telekinetix 2003 All rights
reserved |