flat assembler
Message board for the users of flat assembler.

Index > Windows > recv in the component

Author
Thread Post new topic Reply to topic
Everhest



Joined: 26 Jun 2008
Posts: 83
Location: Russia
Everhest 25 Jun 2009, 16:18
Hi, please help me, i'm write GUI component for control download content from web.

why recv not working?

Code:
    .recvdataloop:
        invoke     recv, [hSocket], [data_buffer], [sizetoread], 0
        or         eax, eax
        je        .destructor_thread
        mov        ecx, eax
        invoke     SendMessage, [htab], FM_SETBYTESREADS, 0, ecx
        invoke     _lwrite, [hfile], [data_buffer], ecx
        jmp       .recvdataloop        


this code from application\include\SOCKS_V_1_1.inc


Description:
Download
Filename: IDL RELEASE 1.rar
Filesize: 164.28 KB
Downloaded: 223 Time(s)


_________________
Forgive for my bad english, I from russia...
Post 25 Jun 2009, 16:18
View user's profile Send private message ICQ Number Reply with quote
pete



Joined: 20 Apr 2009
Posts: 110
pete 26 Jun 2009, 06:23
What exactly does not work? What is returned by recv? Probably you only need to pass the address of data_buffer to recv, like that:
Code:
        invoke     recv, [hSocket], data_buffer, [sizetoread], 0 
    
Post 26 Jun 2009, 06:23
View user's profile Send private message Reply with quote
SFeLi



Joined: 03 Nov 2004
Posts: 138
SFeLi 26 Jun 2009, 07:50
pete, no, data_buffer contains an address of buffer allocated with VirtualAlloc, IIRC.
Post 26 Jun 2009, 07:50
View user's profile Send private message Reply with quote
Everhest



Joined: 26 Jun 2008
Posts: 83
Location: Russia
Everhest 26 Jun 2009, 08:17
FIONREAD = 1074030207 (DEC) or over value???
Post 26 Jun 2009, 08:17
View user's profile Send private message ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.