News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

INTERNET_ASYNC_RESULT struture issue

Started by bsdsource, January 30, 2014, 07:00:04 AM

Previous topic - Next topic

bsdsource

I have no clue on how to access a INTERNET_ASYNC_RESULT structure from within a wininet callback function.

The following link provides a prototype for an application-defined status callback function:
InternetStatusCallback callback function

The above link indicates when an asynchronous operation has been completed, the lpvStatusInformation parameter contains the address of an INTERNET_ASYNC_RESULT structure. It seems that lpvStatusInformation is a LPVOID which is just a DWORD if I'm not mistaken, but how would I access the INTERNET_ASYNC_RESULT structure?


qWord

The pointer-type depends on the notification.
IFNDEF DWORD_PTR
DWORD_PTR typedef DWORD ; QWORD for x86-64
ENDIF
InternetStatusCallback proc hInternet:HANDLE,dwContext:DWORD_PTR,dwInternetStatus:DWORD,lpvStatusInformation:LPVOID,dwStatusInformationLength:DWORD
.if dwInternetStatus == INTERNET_STATUS_REQUEST_COMPLETE
mov edx,lpvStatusInformation
mov eax,[edx].INTERNET_ASYNC_RESULT.dwResult
;...
.endif
ret
InternetStatusCallback endp
MREAL macros - when you need floating point arithmetic while assembling!

bsdsource

qWord, that's exactly what I was looking for. Thanks. :t