Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

ResumeSuspendedDownload function

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

hRequest [in]

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

dwResultCode [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 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

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Wininet.h

Library

Wininet.lib

DLL

Wininet.dll

See also

InternetErrorDlg
InternetStatusCallback

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.