共用方式為


ResumeSuspendedDownload 函式 (wininet.h)

ResumeSuspendedDownload 函式會繼續使用者介面對話框暫停的要求。

語法

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

參數

[in] hRequest

使用者介面對話框暫停的要求句柄。

[in] dwResultCode

InternetErrorDlg 傳回的錯誤結果,如果叫用不同的對話框,則為零。

傳回值

如果成功,則傳回 TRUE ;否則 為 FALSE。 呼叫 GetLastError 以取得擴充錯誤資訊。

備註

以異步方式使用 WinINet 函式的應用程式可以呼叫 ResumeSuspendedDownload 以繼續使用者介面對話框暫停的要求。

例如,在呼叫 InternetErrorDlg 之後呼叫 ResumeSuspendedDownload,或在 lpvStatusInformation 參數等於 INTERNET_STATUS_USER_INPUT_REQUIRED時,在 InternetStatusCallback 函式中呼叫 ResumeSuspendedDownload。 下列程式代碼範例示範如何在回呼中使用 ResumeSuspendedDownload 函式。

就像 WinINet API 的其他所有層面一樣,無法在 DllMain 或全域物件的建構函式和解構函式內安全地呼叫此函式。

注意 WinINet 不支援伺服器實作。 此外,它不應該從服務使用。 對於伺服器實作或服務,請使用 Microsoft Windows HTTP 服務 (WinHTTP)
 

範例

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;
}

規格需求

需求
最低支援的用戶端 Windows 2000 專業版 [僅限傳統型應用程式]
最低支援的伺服器 Windows 2000 Server [僅限傳統型應用程式]
目標平台 Windows
標頭 wininet.h
程式庫 Wininet.lib
Dll Wininet.dll

另請參閱

InternetErrorDlg

InternetStatusCallback