ResumeSuspendedDownload function (wininet.h)

The ResumeSuspendedDownload function resumes a request that is suspended by a user interface dialog box.

Syntax

BOOL ResumeSuspendedDownload(
  [in] HINTERNET hRequest,
  [in] DWORD     dwResultCode
);

Parameters

[in] hRequest

Handle of the request that is suspended by a user interface dialog box.

[in] dwResultCode

The error result returned from InternetErrorDlg, or zero if a different dialog is invoked.

Return value

Returns TRUE if successful; otherwise FALSE. Call GetLastError for extended error information.

Remarks

Applications that use WinINet functions asynchronously can call ResumeSuspendedDownload to resume a request that is suspended by a user interface dialog box.

For example, call ResumeSuspendedDownload after a call to InternetErrorDlg, or in an InternetStatusCallback function when the lpvStatusInformation parameter equals INTERNET_STATUS_USER_INPUT_REQUIRED. The following code example shows you how to use the ResumeSuspendedDownload function in a callback.

Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.

Note  WinINet does not support server implementations. In addition, it should not be used from a service. For server implementations or services use Microsoft Windows HTTP Services (WinHTTP).
 

Examples

void CALLBACK YourInternetStatusCallbackFunction(
    HINTERNET hInternet,
    DWORD_PTR dwContext,
    DWORD dwInternetStatus,
    LPVOID lpvStatusInformation
    DWORD dwStatusInformationLength )
{
//  [...other callback code here]

  switch (dwInternetStatus)
  {
//  [...handle other INTERNET_STATUS cases]

    case INTERNET_STATUS_USER_INPUT_REQUIRED:
      ResumeSuspendedDownload( hInternet, 0 );
      break;

//  [...handle other INTERNET_STATUS cases]

    default:
//    [...default code]
      break;
  }

  return;
}

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wininet.h
Library Wininet.lib
DLL Wininet.dll

See also

InternetErrorDlg

InternetStatusCallback