mIRC Home    About    Download    Register    News    Help

Print Thread
#143352 23/02/06 02:13 PM
Joined: May 2005
Posts: 449
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: May 2005
Posts: 449
I'm writing a DLL with Visual Basic. This is the first one I've written, and I'm not sure how to use it in mIRC once it's written. It's going to return weather conditions for a specific zip code. My question is how do I store the information that is returned? Can I assign it to a variable? Also, will mIRC's max variable length be a problem if it's too long? This next question might be more of a VB question, but when writing the DLL, can I use multiple "return" lines, and on the mIRC side, assign it to several variables to deal with the length issue? Thanks.

#143353 23/02/06 09:30 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
//set %weather = $dll(weather.dll,temp,<some zip>)

If that's not what you meant then I guess they were both VB questions. smile

-Andy

#143354 24/02/06 03:19 AM
Joined: May 2005
Posts: 449
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: May 2005
Posts: 449
That's the answer I wanted. Thanks smile I figured it was probably something like that but I wasn't sure. I also wanted to know if there was anything I could do on the mIRC side of it if the text is too long for one mIRC variable. Thanks for answering my question.

#143355 24/02/06 03:55 AM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
There are two possibilitiesfor handling the "string too long error", which mIRC generates if the data in the variable and the variable name is greater than about 950 characters (I don't recall the exact number) that I'm aware of.
1) Use a binary variable for the storage
2) put the data into a hash table

Personally, I like the second of those two as I've never managed to quite grasp how binary variables work.

#143356 24/02/06 02:06 PM
Joined: May 2005
Posts: 449
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: May 2005
Posts: 449
How would you load the response from a DLL into a hash table? This is my first time working with DLLs, but it seems to me like the DLL would throw all the data at you at once, so I'm not sure how you could handle it.

#143357 24/02/06 02:09 PM
Joined: Feb 2005
Posts: 185
S
Vogon poet
Offline
Vogon poet
S
Joined: Feb 2005
Posts: 185
Russel... Whats the best way of explaining what a "Hash Table" is?

I have opened one of them in notepad, and they are full if digits, is it like a mIRC page file?

#143358 24/02/06 02:24 PM
Joined: May 2005
Posts: 449
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: May 2005
Posts: 449
They can be digits or other data. It's sort of like a database. You could have a hash table that stores something like this:
Name, Email Address. Then you could search the hash table for "Blake" and the data associated for me would be my email address.


Link Copied to Clipboard