as the title says, any clue?
i have two problems actually:
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
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
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....
lol i fixed that actually like 1 minute later, when i tried to split my tokens into 3
see:
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
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
Mmmm... Interesting there seems to be a 48 Byte limit, never ran into that before.
i take it u tried it urself? lol ;x
got same error?
got same error?
Yeah, The limit is only imposed when you use comma seperated bytes by the way. This is very interesting.
i found a bug? ;x
a suggestion to make it using commas???
is there a way? external file?
a suggestion to make it using commas???
is there a way? external file?
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
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
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?
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
so for my proogram it'll be:
?
invoke send,[hSocket],addr ConnectToken,111,0
?
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 :)
Actually, when you break up a string on several lines, you don't have to give a label to each line. So
Raymond
test db 00h,01h,02h
is the same in memory as
test1 db 00h
db 01h
db 02h
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