Author Topic: c to asm ,HTTP critical section  (Read 1956 times)

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
c to asm ,HTTP critical section
« on: August 11, 2014, 02:32:03 AM »
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 :
Code: [Select]
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

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: c to asm ,HTTP critical section
« Reply #1 on: August 11, 2014, 05:04:58 AM »

Found ,in the callback function,change all the INTERNET_STATUS_REQUEST_COMPLETE by this one
Code: [Select]
.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

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: c to asm ,HTTP critical section
« Reply #2 on: August 12, 2014, 02:15:06 AM »

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