• Welcome to Valhalla Legends Archive.
 

BNLS_VERSIONCHECKEX, BNLS_VERSIONCHECKEX2: What's the difference?

Started by Don Cullen, February 12, 2007, 01:21 PM

Previous topic - Next topic

l2k-Shadow

Quote from: Kyro on February 14, 2007, 01:28 PM
I apologize for being stupid.

That being said, how exactly would I extract them into an unsigned 64 bit integer?

I don't think you can do that with VB, although you might be able to do it with As Currency... however, the easiest way would be to just extract the 8 bytes from the packet and send them back using a String variable type or a byte array.
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

Don Cullen

This is how I'm extracting the filetime:

Dim MPQFileTime As String
...
...
MPQFileTime = PktDeBuf.rFILETIME(True)


This is the rFILETIME function in the pktdebuf class:

Public Function rFILETIME(Optional QWORD As Boolean = False) As String
    Dim strFT() As String, strTMP As String
    If Not QWORD Then
        strFT = Split(rNTString & Space(1), Space(1))
        If strFT(0) > 2147483647 Then strFT(0) = (strFT(0) - 4294967296#)
        If strFT(1) > 2147483647 Then strFT(1) = (strFT(1) - 4294967296#)
    Else
        ReDim strFT(0 To 1)
        strFT(1) = rDWORD
        strFT(0) = rDWORD
    End If
    rFILETIME = strFT(0) & Space(1) & strFT(1)
End Function


That's from Hdx's packet debuffer class.

So in other words, I'm extracting the filetime into a string variable. How would I then proceed to turn around and send this to BNLS?
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

UserLoser

No, a string isn't a integer.  Create a function that extracts a 64-bit integer.  That function is messyy and pointless anyways, could have just used CopyMemory to copy into the FILETIME structure

Don Cullen

How would that be done then?

BTW, you said:

Quote from: UserLoser on February 14, 2007, 01:25 PM
Quote from: Kyro on February 14, 2007, 01:22 PM
Explain.

Don't copy the eight bytes from SID_AUTH_INFO into a Win32 FILETIME structure.  Just extract the eight bytes instead into an unsigned 64-bit (8-byte) integer.  This will ensure you that you will always be sending proper data to the BNLS server.

So which is it? copy into filetime structure or don't?
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

UserLoser

Quote from: Kyro on February 14, 2007, 02:03 PM
How would that be done then?

BTW, you said:

Quote from: UserLoser on February 14, 2007, 01:25 PM
Quote from: Kyro on February 14, 2007, 01:22 PM
Explain.

Don't copy the eight bytes from SID_AUTH_INFO into a Win32 FILETIME structure.  Just extract the eight bytes instead into an unsigned 64-bit (8-byte) integer.  This will ensure you that you will always be sending proper data to the BNLS server.

So which is it? copy into filetime structure or don't?

If you're using the latest BNLS version check message, don't.  If you're doing a local version check and have to compare the FILETIME structures on the file, do.

Don Cullen

Okay, then I won't. I'm using BNLS_VERSIONEX2.

At the highly probable risk of sounding extremely stupid, how exactly would I extract eight bytes into an unsigned 64 bit (8 byte) integer in vb?

I was going to extract 4 bytes at a time via DWORD and pop each segment into a long variable... but it seems ive been told that's an inefficent way to do it?
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

Barabajagal

It's MUCH easier just to use a FILETIME struct for this when you're using a language that doesn't natively support 64 bit integers. I don't see what the problem with using it is. I've been using it since I added MPQ downloading to my bot (back when BNLib.dll still worked), and I've never had problems with it.

Hdx

I actually wrote that function to jut extract the data for debug purposes mainly.
Considering I never really did anything with it.
BUT, Considering you are using VB, And VB does not natively support 64-bit integers. (The Highest it goes is 32-bit signed)
Your best bet would be to do as Ul said, Copy the data into a FileTime struct using CopyMemory()
Which would look something like the following:
Dim ftData as FileTime
CopyMemory strBufferedData, ftData, 8

Something like that, It's been a while since I worked with VB.
As for giving Blizzard Ideas :P I actually send them a 4 page document emphasizing some of there shortcomings/mistakes (In my opinion) of BNCS protocol in general.
They've only taken my advice on two occasions.
~-~(HDX)~-~

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

Don Cullen

It's okay, I solved the problem. I noticed that I was extracting it using the function into a string variable, so I included it in the packet with:

.InsertNonNTString MPQFileTime

So basically, your function worked fine.
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

Hdx

No, not it didn't
my function returns it in a specificly formatted string that I sent to my BNCSFileTimeToDate() function.
~Hdx

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

UserLoser

Quote from: Hdx on February 14, 2007, 06:16 PM
As for giving Blizzard Ideas :P I actually send them a 4 page document emphasizing some of there shortcomings/mistakes (In my opinion) of BNCS protocol in general.
They've only taken my advice on two occasions.
~-~(HDX)~-~

Link to it, please.

Hdx

Don't have it anymore, it was like 4 years ago when i was working intently on adding full emulation to my bot.
http://www.jbls.org/Downloads/clsBuff.cls
Thats not my best work, but thats one of my 1/2 way decent buffer classes.
~-~(HDX)~-~

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

Joe[x86]

Quote from: UserLoser on February 14, 2007, 12:59 PM
Quote from: Hdx on February 14, 2007, 10:12 AM
how would you use it if bnet changed to randomly named mpqs?
for example:
pig.mpq
dog.mpq
monkey.mpq

Anyways, i'll try to refrane from posting ater my final comment.
BNLS_VERSIONCHECKEX2 was created so that bnls would have as much information as the game does.
It was created so that Skywing could be ale to simply update BNLS and all of the bot developers would NOT need to modify there products.
Which in turn saves  lot of hassel developer wise and consumer wise.
There is a prime examle right now.
StealthBot is widly used, but there are two versions of it out.
The oly diffrence is how t grabs the mpq archive id.
It woud be much less hassel just to sa something like the following:
Bnet has made some changes to it's method to verrify yu are useing the latest version f there game, so if you are getting te error [BNET] Version CheckFailed, please be patient, we are working on it.

And the other post being:
Bnls has beenupdated to reflect recet changes, your bots should now be working.

Its allment to make life easier even if right now its a waste of a FEW bytes.
~Hdx

Quit giving Blizzard ideas!

I've already expressed the dog cat monkey idea, except in more professional-esque names.

Any idea someone gives Blizzard on these forums as of now is mostly reiteration of what's already been said at the release of lockdown.
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

|