Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Callbacks?

Status
Not open for further replies.

instar4per

Programmer
Jan 21, 2002
48
US
I have an application in which I take a large volume of domain names (the current list I have is approximately 35,000), and find out various information on them (including, WHOIS info, resolved IP, etc).

Rather than hard-code these in, I would like to use a modular design, and add the components at run time (plugins). This part I can implement just fine. The part I am confused on is how to report the data back to the host application.

The idea I had in mind was this, and I would very much appreciate comments / criticism on it:

Creating a DLL for a specific application, such as WHOIS parsing. Get the list of domains into an array, and pass the address of the array to the DLL (ByRef?). The DLL would in turn use an array of windows sockets to run quieries against the WHOIS server (I am aware of the speed limitations, I found out the hard way [mad]). The part I am unsure of would be how to return the value back to my program (domain x returns value of 'y').

I cannot use events, at least in the way that I would know how to. This is because I am going to be using an array of loaded controls, which does not support the WithEvents modifier.

The way I am probably going to resort to would be polling, although this is really not what I want to do. If anyone has ideas on using a sexy solution such as a callback, I would be very interested.

Please let me know how it turns out, -iNSTA
aim: instar4per
email: instar4per @ hotmail.com
 
Since you're using VB you can't create a truly Object Oriented Design for this project. What you can do however is use some of the techniques...

I would create a Domain object with all of the information pertanite to a Domain. I would then create a function that takes a string for a domain name and returns a Domain object populated with all info. This way you can loop through a list calling the method, getting a Domain object, and output the info you need. Also, the method should be self-contained so you can use it in other projects.... -iNSTA
aim: instar4per
email: instar4per @ hotmail.com
 
What the ... ?

Right. Well, apparently, I'm cloning on here.

[noevil] -iNSTA
aim: instar4per
email: instar4per @ hotmail.com
 
Does anybody have any ideas on this?

The part I am confused on is how to simulate an event, without actually raising one.

I've heard rumors about using callbacks, but I don't know how to do this.

And, by the way, I really don't know how the 2nd poster got under my name...

Anyways, -iNSTA
aim: instar4per
email: instar4per @ hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top