vb6
For some reason this doesn't work, in theory it should but is doesn't.
[cpde]Case &HB
Dim HASH(2) As String
If cb = True Then
HASH(0) = MakeDWORD(GTC)
HASH(1) = MakeDWORD(Servers)
HASH(2) = Mid(data, 4, Len(data) - 3)
InsertWORD &H1C
InsertDWORD &H1
InsertNonNTString HASH(0) & HASH(1) & HASH(2)
sendBNLSPacket &HB
'InsertDWORD Len(varPass)
'InsertDWORD &H0
'InsertNonNTString varPass
'sendBNLSPacket &HB
cb = False
ElseIf cb = False Then
InsertDWORD GTC
InsertDWORD Servers
InsertNonNTString Mid(data, 4, Len(data) - 3)
InsertNTString varUser
sendPacket &H3A
cb = False
End If
ANy help is appreciated.
0x0A, 0x0B, 0x0C are used to enter chat. If you do not want to make an account, I recommend you do this:
InsertNTString varuser
InsertBYTE 0
sendPacket &HA
InsertNonNTString varproduct
sendPacket &HB
InsertDWORD 2
InsertNTString varhome
sendPacket &HC
If you do want to create an account here is the code:
Private Sub CreateAccount()
Dim accounthash As String
Dim result As Variant
accounthash = String(5 * 4, vbNullChar)
result = X(accounthash, m_Password)
pBuffer.InsertNonNTString accounthash
pBuffer.InsertNTString m_Username
pBuffer.SendPacket &H3D
End Sub
he's talking about using BNLS, not local hashed
Yes, userloser was right. But if anyone has any suggestions on how to make my stupid computer work & call bnetauth.dll that'd work too.(for some reason it cannot find entry points into bnetauth.dll when they do exist)
Quote from: CrAz3D on October 13, 2003, 03:49 PM
Yes, userloser was right. But if anyone has any suggestions on how to make my stupid computer work & call bnetauth.dll that'd work too.(for some reason it cannot find entry points into bnetauth.dll when they do exist)
No extra _ or @ or other decorations?
No decorations, Adron. Maybe you need updated Visual C++ runtimes.
Quote from: Adron on October 13, 2003, 05:41 PM
Quote from: CrAz3D on October 13, 2003, 03:49 PM
Yes, userloser was right. But if anyone has any suggestions on how to make my stupid computer work & call bnetauth.dll that'd work too.(for some reason it cannot find entry points into bnetauth.dll when they do exist)
No extra _ or @ or other decorations?
Mind explaining that for me?
Sometimes, exported DLL functions have whacked out names, I think they may have something to do with parameter types, i.e. Genhash@XYGGGZ17
The stupid thing about this one is that it works when I am in Design mode of VB. I don't have any clue on the face of this earth about why my computer semi-randomly picks things out not to work.
Quote from: UserLoser on October 13, 2003, 06:51 PM
No decorations, Adron. Maybe you need updated Visual C++ runtimes.
I'd like to know just what that has to do with this. Last time I checked, only using the /EXPORT linker option directly or using a .def file and setting the external name had any relevance to what the exported symbol is named.
Quote from: St0rm.iD on October 14, 2003, 09:06 PMSometimes, exported DLL functions have whacked out names, I think they may have something to do with parameter types, i.e. Genhash@XYGGGZ17
This behavior results from exporting the mangled name of languages which use name mangling to support overloading (such as C++). In C, there can be no more than one function named foo, so its name in the assembly and in the DLL is simply foo. In C++, you can have foo(int), foo(double), etc. Each of these needs to be distinguishable during the link phase, so the names are mangled to reflect the parameter types. Unfortunately, these names usually end up in the DLL's export list in their mangled form.
That's one part. The other is that calling conventions sometimes also change the naming of the functions, adding a _ or an @8 to the name. For stdcall, I think the number of bytes on stack is added after an @.
Design mode and run mode might differ in search paths, check if you have more than one dll of different versions with different exported symbols.
Quote from: Adron on October 15, 2003, 05:46 PMThe other is that calling conventions sometimes also change the naming of the functions, adding a _ or an @8 to the name. For stdcall, I think the number of bytes on stack is added after an @.
Yes. However, in all the cases I've checked, the leading underscore and/or stdcall notation is stripped back off automatically before it gets put into a DLL as an export. It's entirely possible that there's some tool(s) out there which don't do this, but I haven't seen them.
Quote from: Kp on October 16, 2003, 11:14 AM
Yes. However, in all the cases I've checked, the leading underscore and/or stdcall notation is stripped back off automatically before it gets put into a DLL as an export. It's entirely possible that there's some tool(s) out there which don't do this, but I haven't seen them.
extern "C" __declspec(dllexport) int testfunc1(int a, int b)
{
return a*b;
}
extern "C" __declspec(dllexport) int __stdcall testfunc2(int a, int b)
{
return a*b;
}
__declspec(dllexport) int testfunc3(int a, int b)
{
return a*b;
}
__declspec(dllexport) int __stdcall testfunc4(int a, int b)
{
return a*b;
}
Dump of file testdll.dll
File Type: DLL
Section contains the following exports for testdll.dll
0 characteristics
3F8ED6E0 time date stamp Thu Oct 16 19:35:28 2003
0.00 version
1 ordinal base
4 number of functions
4 number of names
ordinal hint RVA name
1 0 00001014 ?testfunc3@@YAHHH@Z
2 1 00001005 ?testfunc4@@YGHHH@Z
4 2 0000100A _testfunc2@8
3 3 0000100F testfunc1