Jump to content

Problem calling a COM function


Rickname
 Share

Recommended Posts

After searching how to get the Country and City from a specific IP, I found that the fastest and only method was using this COM object provided by http://dev.maxmind.com/geoip/downloadable where the download link is this one http://www.maxmind.com/GeoIP-COM-1.3.zip

It is a pretty basic and simple COM but I don't know how to implement it in a script >_< :think:

I will really apreciate any little help :) Thanyou

Edited by Rickname
Link to comment
Share on other sites

Check GeoIP_doc.txt. There you'll find how to register the DLL. In the examples directory you'll find the ASP example that show how to create the object and then use the properties and methods.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Please do not post the in different forums :naughty:

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Thanks alot water ( also I like more water than coca-cola ;) ) ! Yes I won't post cloned threads anymore but I couldn't delete my first thread and it was posted in the wrong section >_<.

One more little thingie , how that .ASP file can show to me the rest ? :thinking:

Edited by Rickname
Link to comment
Share on other sites

The documentation tells you all you need. The ASP example translated to AutoIt to return the city for a hostname:

Global $oGeoIp = ObjCreate("GeoIPCOMEx.GeoIPEx")
$oGeoIp.set_db_path("C:\Program Files\GeoIP\")
$oGeoIp.find_by_name($sHostname)
$sCity = $oGeoIp.city
Untested!

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

The documentation tells you all you need. The ASP example translated to AutoIt to return the city for a hostname:

Global $oGeoIp = ObjCreate("GeoIPCOMEx.GeoIPEx")
$oGeoIp.set_db_path("C:\Program Files\GeoIP\")
$oGeoIp.find_by_name($sHostname)
$sCity = $oGeoIp.city
Untested!

Dude, you're awesome, I don't have words ! Thanks a ton !!! IT just works ! I registered the dll as described, put there the datebase and the script you provided...its just awesome thanks dude !!

EDIT : I will make a UDF with this just for the ppl who will still need this :)

Edited by Rickname
Link to comment
Share on other sites

Glad to be of service :D

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...