Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: Tontow on May 10, 2005, 12:10 PM

Title: winsock license information not found?
Post by: Tontow on May 10, 2005, 12:10 PM
Whenever I try to add winsock to my form I end up getting a "license information not found" error.  Dose anyone know how to fix or get by this?
Title: Re: winsock license information not found?
Post by: Tontow on May 10, 2005, 02:02 PM
If there is no way to get the license then,

Is CSocket just as good?? CSocket (http://www.vbip.com/winsock-api/csocket-class/csocket-class-01.asp)
Title: Re: winsock license information not found?
Post by: Blaze on May 10, 2005, 02:54 PM
If you are using the Standard version of Microsoft Visual Studio, you cannot use the winsock control.
Title: Re: winsock license information not found?
Post by: Tontow on May 10, 2005, 03:13 PM
I gess I'm useing the standard vershion then.  What else could I use?  I did a search and found CSocket, but I don't know if it's compairable to winsock.
Title: Re: winsock license information not found?
Post by: R.a.B.B.i.T on May 10, 2005, 04:52 PM
It's better than Winsock.
Title: Re: winsock license information not found?
Post by: Ringo on May 11, 2005, 03:05 AM
Quote from: Tontow on May 10, 2005, 12:10 PM
Whenever I try to add winsock to my form I end up getting a "license information not found" error.  Dose anyone know how to fix or get by this?

VB Learning ediion.

You need enterprize or pro edition to use winsock controlls.

Altho i think u can get them for learning, not sure how tho.
Title: Re: winsock license information not found?
Post by: QwertyMonster on May 11, 2005, 09:27 AM
Download a crack for it like i did. Umm oops. Yeah.

Search for: Visual basic 6 Enterprise edition crack on google.
Title: Re: winsock license information not found?
Post by: Tontow on May 11, 2005, 11:18 AM
Thanks.  I'll try useing CSocket for now.


Dose anyone know of a good packet tutorial? (sending/reading/creating/etc)
Title: Re: winsock license information not found?
Post by: R.a.B.B.i.T on May 11, 2005, 02:57 PM
What kind of packet?  (almost) Every program  that sends packets uses a different format, ie BNCS packets != AIM packets.
Title: Re: winsock license information not found?
Post by: Tontow on May 11, 2005, 04:46 PM
well perferably the packets a chat bot would send to log on to battlenet though bnls, but it would be nice to know how to do the ones you would send to log on to battle net (not being able to go into private channels).
Title: Re: winsock license information not found?
Post by: R.a.B.B.i.T on May 11, 2005, 08:46 PM
CHAT packet structure is Telnet plain-text standard.
Title: Re: winsock license information not found?
Post by: Tontow on May 12, 2005, 01:15 AM
Ok, I did some searching and found http://botdev.valhallalegends.com/documents/vbpacketbc.html , but I have a few questions.

QuoteFunction MakeDWORD(Value As Long) As String   
Dim Result As String * 4   
CopyMemory ByVal Result, Value, 4   
MakeDWORD = Result
End Function

Why the *4?

Do I send each DWORD seperatly or together in one string?
Title: Re: winsock license information not found?
Post by: UserLoser. on May 12, 2005, 06:48 AM
Quote from: Tontow on May 12, 2005, 01:15 AM
Ok, I did some searching and found http://botdev.valhallalegends.com/documents/vbpacketbc.html , but I have a few questions.

QuoteFunction MakeDWORD(Value As Long) As String   
Dim Result As String * 4   
CopyMemory ByVal Result, Value, 4   
MakeDWORD = Result
End Function

Why the *4?

Do I send each DWORD seperatly or together in one string?

* 4 allocates 4 bytes of space in Result.  It's needed in this case because CopyMemory is being used to copy Value to Result.  If there's no space available in Result, you can't copy and your program will probably crash.  You could also use something like Result = Space(4) or Result = String(vbNullChar, 4)
Title: Re: winsock license information not found?
Post by: Hdx on May 12, 2005, 12:27 PM
Quote from: Tontow on May 12, 2005, 01:15 AMDo I send each DWORD seperatly or together in one string?

You could send each DWORD alone, after youve sent the header for the packet, But I wouldnt recomend it, I would recomend building the eintire packet locally, and then sending it all together.

Quote from: UserLoser on May 12, 2005, 06:48 AM
Result = String(vbNullChar, 4)
Result = String(4, vbNullChar)
~-~(HDX)~-~
Title: Re: winsock license information not found?
Post by: Tontow on May 12, 2005, 09:37 PM
Ok, Let me see if I'm doing the packets right.

Acording to bnetdocs.com the Logon Sequence for a chat bot is:

Quote
SEND ->  Protocol byte (01)
SEND -> SID_AUTH_INFO (0x50)
RECV <- SID_PING (0x25)
RECV <- SID_AUTH_INFO (0x50)
SEND -> SID_PING (0x25) [Optional]
SEND -> SID_AUTH_CHECK (0x51)
RECV <- SID_AUTH_CHECK (0x51)
SEND -> SID_LOGONRESPONSE (0x29)
RECV <- SID_LOGONRESPONSE (0x29)
SEND -> SID_UDPPINGRESPONSE (0x14) [SEXP/STAR/W2BN]
SEND -> SID_ENTERCHAT (0x0A)

And the format for the protocol byte is:
Quote
BNCS Headers
BNCS stands for Battle.Net Chat Server and is the protocol that Blizzard's Battle.net enabled games use to communicate. Every BNCS message has the same header:


(BYTE)      Always 0xFF
(BYTE)      Message ID
(WORD)      Message length, including this header
(VOID)      Message Data
The BNCS protocol is aggresively enforced by Battle.net - at least, for clients - and violations of the protocol generally result in an IP ban.

When connecting to a BNCS server, you must first tell the server which protocol you wish to use. Some of the Protocol IDs are:
Games: 0x01
FTP: 0x02
Chat: 0x03

So to send the protocol packet the code would be?
Quote
Function MakeWORD(Value As Integer) As String
Dim Result As String * 2
CopyMemory ByVal Result, Value, 2
MakeWORD = Result
End Function


Public function sendprotocall()
        sckclient.SendData &HFF
        sckclient.SendData (1)
        sckclient.SendData MakeWORD(Len(buffer) + 4)
        sckclient.SendData &H3
end function

Title: Re: winsock license information not found?
Post by: Blaze on May 13, 2005, 07:38 AM
Quote from: Tontow on May 12, 2005, 09:37 PM
Public function sendprotocall()
        sckclient.SendData &HFF
        sckclient.SendData (1)
        sckclient.SendData MakeWORD(Len(buffer) + 4)
        sckclient.SendData &H3
end function
You only want to send the protocol byte once at the start and its before &HFF.
Title: Re: winsock license information not found?
Post by: Tontow on May 13, 2005, 11:35 AM
So it should be?
Quote
Public function sendprotocall()
        sckclient.SendData &H3 'id for chat
        sckclient.SendData &HFF ' byte
        sckclient.SendData (1) 'message id
        sckclient.SendData MakeWORD(Len(buffer) + 4) 'Message length
end function
Title: Re: winsock license information not found?
Post by: R.a.B.B.i.T on May 13, 2005, 12:03 PM
No...
The format you said is a binary BNCS packet sent to Battle.Net after specifying that you will be using plaintext Telnet format.  That is a very bad thing to do.
Title: Re: winsock license information not found?
Post by: Tontow on May 13, 2005, 01:28 PM
So all i have to send
Quote
sckclient.SendData &H3
sckclient.SendData "[email protected]"
[email protected] "pass"

correct?

(note: I'm trying to learn to connect regularly to battlenet with telnet for chat/bot befor I try useing blns to log on - kinda a walk befor you run thing for me)