Edit: Accidental double post
I've been working on porting BnetAuth.dll from C++ to VB so that I can insert it into my VB project without having to include the extra .dll file.
I've gotten a decent amount of the password hashing finished, however I'm stuck.
hashbuf[] is referring to an unsigned long array cotaining 5 blocks of information, each block being 10 bytes long.
What I'm confused about is what exactly hashbuf+5 does, I think it's joining the array someway, but I don't know exactly how.
You can add to an array instead of indexing into it, so this:
a = array[ 7 ];
is the same as
a = array + 7;
or
a = array[ 0 ];
is the same as
a = *array;
Don't forget, however, that Visual Basic doesn't have unsigned datatypes. I hope you have some workaround for that.
Quote from: LoRd[nK] on February 09, 2004, 01:04 AM
I've been working on porting BnetAuth.dll from C++ to VB so that I can insert it into my VB project without having to include the extra .dll file.
I've gotten a decent amount of the password hashing finished, however I'm stuck.
hashbuf[] is referring to an unsigned long array cotaining 5 blocks of information, each block being 10 bytes long.
What I'm confused about is what exactly hashbuf+5 does, I think it's joining the array someway, but I don't know exactly how.
I have everything ported over into VB - If you want it, I can send it to you when I get home
Quote from: UserLoser. on February 09, 2004, 10:43 AM
Quote from: LoRd[nK] on February 09, 2004, 01:04 AM
I've been working on porting BnetAuth.dll from C++ to VB so that I can insert it into my VB project without having to include the extra .dll file.
I've gotten a decent amount of the password hashing finished, however I'm stuck.
hashbuf[] is referring to an unsigned long array cotaining 5 blocks of information, each block being 10 bytes long.
What I'm confused about is what exactly hashbuf+5 does, I think it's joining the array someway, but I don't know exactly how.
I have everything ported over into VB - If you want it, I can send it to you when I get home
He's obviously showing the initiative to do it himself.... Why don't you point him in the right direction and help him out? In the end, that will be a lot better for him anyway....
Quote from: iago on February 09, 2004, 08:09 AMa = array[7];
is the same as
a = array + 7;
or
a = array[ 0 ];
is the same as
a = *array;
Not quite. array[ 7 ] refers to the value at offset 7 in the array. array+7 refers to the address of the element at offset 7. That is, *(array+7) == array[ 7 ]. Alternately, &array[ 7 ] == array+7.
No challenge to your second statement, but the forum did damage it (hid your subscript zero).
Quote from: Kp on February 09, 2004, 04:36 PM
Quote from: iago on February 09, 2004, 08:09 AMa = array[7];
is the same as
a = array + 7;
or
a = array[ 0 ];
is the same as
a = *array;
Not quite. array[ 7 ] refers to the value at offset 7 in the array. array+7 refers to the address of the element at offset 7. That is, *(array+7) == array[ 7 ]. Alternately, &array[ 7 ] == array+7.
No challenge to your second statement, but the forum did damage it (hid your subscript zero).
You're right about everything. That was my bad not dereferencing, and I fixed the thing that board broke.