Partager via


ResumeSuspendedDownload function

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

Syntax

BOOL ResumeSuspendedDownload(
  _In_ HINTERNET hInternet,
  _In_ DWORD     dwError
);

Parameters

  • hInternet [in]
    Handle of the request that is suspended by a user interface dialog box.

  • dwError [in]
    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 code example in the following section shows you how to use the ResumeSuspendedDownload function in a callback.

Examples

#include <windows.h>
#include <wininet.h>
#pragma comment(lib, "wininet.lib")

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

Header

Wininet.h

Library

Wininet.lib

DLL

Wininet.dll

See also

InternetErrorDlg

InternetStatusCallback