1

I perform asyncronous WinHttp API calls ( WINHTTP_FLAG_ASYNC flag is set in WinHttpOpen(...) ) inside APC callback.

I'm afraid WinHttp reentrance, mentioned in https://learn.microsoft.com/en-us/windows/win32/winhttp/winhttp-security-considerations :

"WinHTTP is not reentrant in synchronous mode. Because WinHTTP is not reentrant in synchronous mode, do not schedule asynchronous procedure calls (APC) that can call into WinHTTP on an application thread that executes inside a WinHTTP function. While in synchronous mode, WinHTTP performs an "alertable wait," and if the waiting thread is pre-empted to execute an APC and then later re-enters WinHTTP again, WinHTTP's internal state can be corrupted."

Can i be sure that asyncronous WinHttp API never perform alertable wait state internally?

0 Answers0