What does HRESULT 0x80072EF2 (WININET_E_INCORRECT_HANDLE_TYPE) mean?

 
Previous Next
WININET_E_OPERATION_CANCELLED WININET_E_INCORRECT_HANDLE_STATE

WININET_E_INCORRECT_HANDLE_TYPE

WININET_E_INCORRECT_HANDLE_TYPE means that the supplied HINTERNET handle belongs to a different layer of the WinINet handle hierarchy than the called function expects. A valid handle is not automatically valid for every WinINet operation.

Common mistake

WinINet creates related session, connection, request, and file handles. Passing a session or connection handle to a function that requires an HTTP request or opened data handle produces this error even though the numeric handle has not been closed.

What to inspect

  • The function that created the handle and the function now consuming it.
  • Whether a wrapper lost the distinction between connection and request objects.
  • Whether a stale handle value was reused after a close.

Microsoft: InternetConnect · Microsoft: HttpOpenRequest


Looking for a different code? Search another status or error code.