as the title says, any clue?

i have two problems actually:



ConnectToken db 00h, 73h, 00h, 02h, 00h, 80h, 0FFh, 0F2h,\
00h, 0Fh, 00h, 1Eh, 01h, 09h, 03h, 69h, 77h, 70h, 34h, 32h, 35h, 00h, 00h, 00h\
00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h,\
00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h,\
00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 44h, 41h, 52h, 4Bh, 4Eh, 45h, 53h,\
53h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 72h, 6Fh, 68h,\
00h, 50h, 39h, 35h, 61h, 72h, 69h, 33h, 36h, 30h, 53h, 00h, 00h, 00h, 00h, 00h,\
00h, 00h, 00h, 00h, 00h, 0ADh, 9Ah


the first problem when i try to compile that is:

Assembling: D:\masm32\project client\xclient.asm
D:\masm32\project client\xclient.asm(33) : error A2042: statement too complex
D:\masm32\project client\xclient.asm(37) : error A2042: statement too complex

Make error(s) occured.

the second problem is, how would i access ConnectToken correctly? I'm using it as a token string to send to a server. obviously it has a null string. if i use addr of, it will cut off at the first null. what to do :x i think the winsock api says that your string doesnt need to be null-terminated, since it will be sending the actual length or something or another
Posted on 2003-04-13 16:13:32 by xkardisx
Your missing a comma.
ConnectToken db 00h, 73h, 00h, 02h, 00h, 80h, 0FFh, 0F2h,\

00h, 0Fh, 00h, 1Eh, 01h, 09h, 03h, 69h, 77h, 70h, 34h, 32h, 35h, 00h, 00h, 00h\ <---- comma is missing
00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h,\
00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h,\
etc....
Posted on 2003-04-13 16:19:46 by donkey
lol i fixed that actually like 1 minute later, when i tried to split my tokens into 3

see:


ConnectToken db 00h, 73h, 00h, 02h, 00h, 80h, 0FFh, 0F2h,\
00h, 0Fh, 00h, 1Eh, 01h, 09h, 03h, 69h, 77h, 70h, 34h, 32h, 35h, 00h, 00h, 00h,\
00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h

ConnectToken2 db 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h,\
00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 44h, 41h, 52h, 4Bh, 4Eh, 45h, 53h

ConnectToken3 db 53h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 72h, 6Fh, 68h,\
00h, 50h, 39h, 35h, 61h, 72h, 69h, 33h, 36h, 30h, 53h, 00h, 00h, 00h, 00h, 00h,\
00h, 00h, 00h, 00h, 00h, 0ADh, 9Ah


that lets me compile it, even if i had the , fixed i think it wouldnt le tme stioll

yeah i did it with teh fixed commas, same thing:


Assembling: D:\masm32\project client\xclient.asm
D:\masm32\project client\xclient.asm(33) : error A2042: statement too complex
D:\masm32\project client\xclient.asm(37) : error A2042: statement too complex
Posted on 2003-04-13 16:24:03 by xkardisx
Mmmm... Interesting there seems to be a 48 Byte limit, never ran into that before.
Posted on 2003-04-13 16:28:16 by donkey
i take it u tried it urself? lol ;x

got same error?
Posted on 2003-04-13 16:29:32 by xkardisx
Yeah, The limit is only imposed when you use comma seperated bytes by the way. This is very interesting.
Posted on 2003-04-13 16:31:59 by donkey
i found a bug? ;x

a suggestion to make it using commas???

is there a way? external file?
Posted on 2003-04-13 16:33:27 by xkardisx
Make smaller strings. The fact is that they will be contiguous in memory anyway. ie.

test db 00h,01h,02h

is the same in memory as

test1 db 00h
test2 db 01h
test3 db 02h

just use test1 when you address it and it should be ok
Posted on 2003-04-13 16:36:41 by donkey
good enough, but the problem is, how do i use it in a function, where null chars are consider to be the terminating character. i want to use this in a tcp/ip data packet, as the login packet. but it will get cut off, right?

how would i use this with the winsock send api?

i know this could go with the networkin section, but the problem is more so dealin in general with strings, or data, with null, and using that as if its a string...

would i just use ADDR test1, and then declare the length right?



invoke send,[hSocket],ADDR test1,3,0
Posted on 2003-04-13 16:42:34 by xkardisx
so for my proogram it'll be:



invoke send,[hSocket],addr ConnectToken,111,0


?
Posted on 2003-04-13 16:45:15 by xkardisx
I'm afraid that I was just checking this thread and noticed the comma thing. I have absolutely no idea of anything about winsock, I generally where tube socks and none at all with slippers if that will help :)
Posted on 2003-04-13 16:50:17 by donkey
Actually, when you break up a string on several lines, you don't have to give a label to each line. So


test db 00h,01h,02h

is the same in memory as

test1 db 00h
db 01h
db 02h

Raymond
Posted on 2003-04-13 18:12:48 by Raymond
<3 ray, thnx



ConnectToken db 00h, 73h, 00h, 02h, 00h, 80h, 0FFh, 0F2h
db 00h, 0Fh, 00h, 1Eh, 01h, 09h, 03h, 69h, 77h, 70h, 34h, 32h, 35h, 00h, 00h, 00h
db 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h
db 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h
db 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 44h, 41h, 52h, 4Bh, 4Eh, 45h, 53h
db 53h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 72h, 6Fh, 68h
db 00h, 50h, 39h, 35h, 61h, 72h, 69h, 33h, 36h, 30h, 53h, 00h, 00h, 00h, 00h, 00h
db 00h, 00h, 00h, 00h, 00h, 0ADh, 9Ah
Posted on 2003-04-13 18:50:35 by xkardisx