Valhalla Legends Forums Archive | Battle.net Bot Development | Visual Basic - BNLS_AUTHORIZEPROOF

AuthorMessageTime
shadypalm88
Please excuse my newbish question, but I'm having a problem generating a checksum to send using BNLS_AUTHORIZEPROOF (0x0f). I am using Yoni's VB CRC32 checksum functions that are listed in the BNLS protocol spec. I wrote a packet parsing sub that returns divided packet data in a user-defined type array, with the actual data in a Variant. Problem is, the checksum function's server key argument is a Long. Trying to pass the key directly causes a type mismatch error. I've tried using combinations of CLng, Val, and Fix, but they either cause the same error or destroy the data.

So here's my question: How can I convert the BNLS server key data (stored in a variant or string) into an equivalent long that I can use to get a valid CRC32 checksum?
October 19, 2003, 1:27 AM
Soul Taker
Do something like this:
[code]CopyMemory lngKey, ByVal Mid$(strData, 4, 4), 4[/code]
lngKey of course being a long where the key will be stored.
October 19, 2003, 1:52 AM
iago
<insert argument about why C++ is better here>
October 19, 2003, 2:24 AM
shadypalm88
Thanks.
October 19, 2003, 2:35 AM
St0rm.iD
[quote author=iago link=board=17;threadid=3139;start=0#msg24539 date=1066530249]
<insert argument about why C++ is better here>
[/quote]

shadypalm obviously is not a n00b, thus he does not deserve vb flaming.

shadypalm: +1
October 19, 2003, 3:10 AM
Kp
[quote author=St0rm.iD link=board=17;threadid=3139;start=0#msg24547 date=1066533040]shadypalm obviously is not a n00b, thus he does not deserve vb flaming.[/quote]Why are veterans excused from being flamed for using a language that doesn't even have an unsigned 32 bit type?
October 19, 2003, 5:08 AM
Adron
[quote author=Kp link=board=17;threadid=3139;start=0#msg24560 date=1066540097]
Why are veterans excused from being flamed for using a language that doesn't even have an unsigned 32 bit type?
[/quote]

They're excused because they may be under pressure from others to use it. That's punishment enough without being flamed as well.
October 19, 2003, 11:09 AM

Search