Valhalla Legends Forums Archive | Visual Basic Programming | winsock license information not found?

AuthorMessageTime
Tontow
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?
May 10, 2005, 5:10 PM
Tontow
If there is no way to get the license then,

Is CSocket just as good?? CSocket
May 10, 2005, 7:02 PM
KkBlazekK
If you are using the Standard version of Microsoft Visual Studio, you cannot use the winsock control.
May 10, 2005, 7:54 PM
Tontow
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.
May 10, 2005, 8:13 PM
R.a.B.B.i.T
It's better than Winsock.
May 10, 2005, 9:52 PM
Ringo
[quote author=Tontow link=topic=11546.msg111867#msg111867 date=1115745041]
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?
[/quote]

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.
May 11, 2005, 8:05 AM
QwertyMonster
Download a crack for it like i did. Umm oops. Yeah.

Search for: Visual basic 6 Enterprise edition crack on google.
May 11, 2005, 2:27 PM
Tontow
Thanks.  I'll try useing CSocket for now.


Dose anyone know of a good packet tutorial? (sending/reading/creating/etc)
May 11, 2005, 4:18 PM
R.a.B.B.i.T
What kind of packet?  (almost) Every program  that sends packets uses a different format, ie BNCS packets != AIM packets.
May 11, 2005, 7:57 PM
Tontow
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).
May 11, 2005, 9:46 PM
R.a.B.B.i.T
CHAT packet structure is Telnet plain-text standard.
May 12, 2005, 1:46 AM
Tontow
Ok, I did some searching and found http://botdev.valhallalegends.com/documents/vbpacketbc.html , but I have a few questions.

[quote]Function MakeDWORD(Value As Long) As String   
Dim Result As String * 4   
CopyMemory ByVal Result, Value, 4   
MakeDWORD = Result
End Function
[/quote]

Why the *4?

Do I send each DWORD seperatly or together in one string?
May 12, 2005, 6:15 AM
UserLoser.
[quote author=Tontow link=topic=11546.msg112240#msg112240 date=1115878525]
Ok, I did some searching and found http://botdev.valhallalegends.com/documents/vbpacketbc.html , but I have a few questions.

[quote]Function MakeDWORD(Value As Long) As String   
Dim Result As String * 4   
CopyMemory ByVal Result, Value, 4   
MakeDWORD = Result
End Function
[/quote]

Why the *4?

Do I send each DWORD seperatly or together in one string?
[/quote]

* 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)
May 12, 2005, 11:48 AM
HdxBmx27
[quote author=Tontow link=topic=11546.msg112240#msg112240 date=1115878525]Do I send each DWORD seperatly or together in one string?
[/quote]

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 author=UserLoser link=topic=11546.msg112248#msg112248 date=1115898531]
Result = String(vbNullChar, 4)
[/quote]Result = String(4, vbNullChar)
~-~(HDX)~-~
May 12, 2005, 5:27 PM
Tontow
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)
[/quote]

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
[/quote]

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
[/quote]

May 13, 2005, 2:37 AM
KkBlazekK
[quote author=Tontow link=topic=11546.msg112316#msg112316 date=1115951836]
Public function sendprotocall()
        sckclient.SendData &HFF
        sckclient.SendData (1)
        sckclient.SendData MakeWORD(Len(buffer) + 4)
        sckclient.SendData &H3
end function
[/quote]
You only want to send the protocol byte once at the start and its before &HFF.
May 13, 2005, 12:38 PM
Tontow
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
[/quote]
May 13, 2005, 4:35 PM
R.a.B.B.i.T
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.
May 13, 2005, 5:03 PM
Tontow
So all i have to send
[quote]
sckclient.SendData &H3
sckclient.SendData "username@useast.battle.net"
username@useast.battle.net "pass"
[/quote]

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)
May 13, 2005, 6:28 PM

Search