Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: R.a.B.B.i.T on June 07, 2004, 10:51 PM

Title: Quick Question
Post by: R.a.B.B.i.T on June 07, 2004, 10:51 PM
Quote(DWORD)       Cookie
(STRING)       Clan name
(DWORD)       Clan tag
(BYTE)       Number of users to invite
(STRING[])    Usernames to invite
Should the strings in 0x71 (SID_INVITEMULTIPLEUSERS) be NT or not?  I can't log this, I lost my discs, so I'd appreciate if someone could help.
Title: Re:Quick Question
Post by: UserLoser. on June 07, 2004, 10:52 PM
Quote from: R.a.B.B.i.T on June 07, 2004, 10:51 PM
Quote(DWORD)       Cookie
(STRING)       Clan name
(DWORD)       Clan tag
(BYTE)       Number of users to invite
(STRING[])    Usernames to invite
Should the strings in 0x71 (SID_INVITEMULTIPLEUSERS) be NT or not?  I can't log this, I lost my discs, so I'd appreciate if someone could help.


Strings are always null terminated when it comes to Battle.net packets!  If they were not null terminated, how would Battle.net know when to split up the data for each username?
Title: Re:Quick Question
Post by: R.a.B.B.i.T on June 07, 2004, 10:56 PM
I don't know, but I've seen some crazy strings in some of my logs.  Thanks, though.
Title: Re:Quick Question
Post by: Soul Taker on June 08, 2004, 05:54 AM
AFAIK, there isn't such a thing as a non-NT STRING.  They have a seperate definition  :P
Title: Re:Quick Question
Post by: R.a.B.B.i.T on June 08, 2004, 07:38 PM
They are strings that don't have a null at the end..there, I defined NonNTString.

I know they are different, but I am using DM's buffer class.
Title: Re:Quick Question
Post by: Eli_1 on June 08, 2004, 07:53 PM
IIRC, there's no such thing as a non-null-terminated string.
Title: Re:Quick Question
Post by: Adron on June 08, 2004, 08:27 PM
Quote from: Eli_1 on June 08, 2004, 07:53 PM
IIRC, there's no such thing as a non-null-terminated string.

Non-null-terminated strings have been mentioned here. Strings without terminating nulls are common.
Title: Re:Quick Question
Post by: Arta on June 09, 2004, 03:04 AM
They're DWORD constants...
Title: Re:Quick Question
Post by: Adron on June 09, 2004, 05:01 AM
In the general case, they exist. One example is pascal strings. In b.net protocols, strings are typically null-terminated.
Title: Re:Quick Question
Post by: Arta on June 09, 2004, 06:04 AM
Right. They're not common on Battle.net :P
Title: Re:Quick Question
Post by: R.a.B.B.i.T on June 09, 2004, 09:27 PM
But they're still there ;)
Title: Re:Quick Question
Post by: tA-Kane on June 12, 2004, 12:50 PM
Quote from: R.a.B.B.i.T on June 09, 2004, 09:27 PMBut they're still there ;)
Can you show me one example of a real NonNTString in the BNCS protocol?

Product (STAR, SEXP, WAR3, CHAT, etc) and Platform (IX86, PMAC, XMAC (and etc?)) IDs are not NonNTStrings, nor are Country Codes (USA and etc). Clan tags are also not NonNTStrings, they're actually DWORDs as well.
Title: Re:Quick Question
Post by: Zakath on June 12, 2004, 09:27 PM
Yes, I'm not aware of a single example of a "non-NT string" on battle.net that isn't actually a DWORD.

The binary connection classes I've written have never had, nor needed, a method for adding a "non-NT string" to the output buffer.

It's all VB's fault! If it actually supported the ability to change how you process a data type...

Insert( (DWORD)'IX86' ); //Platform ID
Title: Re:Quick Question
Post by: R.a.B.B.i.T on June 12, 2004, 10:29 PM
4 character NonNTStrings, DWORDS, all the same.  I was probably wrong, but whatever.
Title: Re:Quick Question
Post by: Adron on June 13, 2004, 06:47 PM
Check client to client udp communication for fixed length strings? Or perhaps that's D2?
Title: Re:Quick Question
Post by: UserLoser. on June 13, 2004, 07:08 PM
Quote from: tA-Kane on June 12, 2004, 12:50 PM
Quote from: R.a.B.B.i.T on June 09, 2004, 09:27 PMBut they're still there ;)
Can you show me one example of a real NonNTString in the BNCS protocol?

Product (STAR, SEXP, WAR3, CHAT, etc) and Platform (IX86, PMAC, XMAC (and etc?)) IDs are not NonNTStrings, nor are Country Codes (USA and etc). Clan tags are also not NonNTStrings, they're actually DWORDs as well.

Never knew that the Country abreviation should be treated as a DWORD, but I checked old Battle.snp because I was curious...:


.text:19017014                 push    offset aReq_countryabr ; "    req.countryAbreviation    = 0x%08X"