c to asm ,HTTP critical section

Started by TouEnMasm, August 11, 2014, 02:32:03 AM

Previous topic - Next topic

TouEnMasm

Hello,
I try to translate a c code using HTTP with a critical section.The connection is asynchronous.
I have done the translate in ansi asm,there is no bug but it don't work as expected.
when :

WaitForRequestCompletion,dwContext,Configuration.UserTimeout

is called ,there is no writing in the output file.
If someone could help , I post the the c and asm source code(ANSI not UNICODE).

Corrected,added zip with macros

Fa is a musical note to play with CL

TouEnMasm


Found ,in the callback function,change all the INTERNET_STATUS_REQUEST_COMPLETE by this one

.elseif eax == INTERNET_STATUS_REQUEST_COMPLETE
;The lpvStatusInformation parameter contains the address of an
;INTERNET_ASYNC_RESULT structure
mov eax,lpvStatusInformation
mov edx,[eax].INTERNET_ASYNC_RESULT.dwError
push edx
.if edx != ERROR_SUCCESS
invoke wsprintf,addr phrase,TXT("Status: INTERNET_STATUS_REQUEST_COMPLETE dwResult!= ERROR_SUCCESS ",13,10),0
.else
invoke wsprintf,addr phrase,TXT( "Status: Request complete",13,10)
.endif
invoke WriteToBlocHeap,addr messages,addr phrase,0
pop edx
invoke ProcessRequest,context,edx
Fa is a musical note to play with CL

TouEnMasm


This one show a dialog box where the more important features can be modified.
I have made it to avoid publicity,If you have ideas on how to search in the file created put them here.
Fa is a musical note to play with CL