Поделиться через


CInternetSession::EnableStatusCallback

Call this member function to enable status callback.

BOOL EnableStatusCallback(
   BOOL bEnable = TRUE 
);

Параметры

  • bEnable
    Specifies whether callback is enabled or disabled. The default is TRUE.

Возвращаемое значение

Nonzero if successful; otherwise 0. If the call fails, determine the cause of the failure by examining the thrown CInternetException object.

Заметки

When handling status callback, you can provide status about the progress of the operation (such as resolving name, connecting to server, and so on) in the status bar of the application. Displaying operation status is especially desirable during a long-term operation.

Because callbacks occur during the request's processing, the application should spend as little time as possible in the callback to prevent degradation of data throughput to the network. For example, putting up a dialog box in a callback may be such a lengthy operation that the server terminates the request.

The status callback cannot be removed as long as any callbacks are pending.

To handle any operations asynchronously, you must either create your own thread or use the WinInet functions without MFC.

Исключения

This method can throw exceptions of type CInternetException*.

Требования

Header: afxinet.h

См. также

Основные понятия

CInternetSession Class

CInternetSession Members

Hierarchy Chart

CInternetSession::CInternetSession