Microsoft Windows CE 3.0  

INTERNET_STATUS_CALLBACK

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function is a prototype for an application-defined status callback function.

typedef void (CALLBACK *INTERNET_STATUS_CALLBACK)(
HINTERNET
hInternet, 
DWORD_PTR
dwContext, 
DWORD
dwInternetStatus, 
LPVOID
lpvStatusInformation, 
DWORD
dwStatusInformationLength
);

Parameters

hInternet
[in] Handle for which the callback function is being called.
dwContext
[in] Address of an unsigned long integer value that contains the application-defined context value associated with the hInternetparameter.
dwInternetStatus
[in] Unsigned long integer value that contains the status code that indicates why the callback function is being called. The following table shows the values for the dwInternetStatusparameter.
Value Description
INTERNET_STATUS_CLOSING_CONNECTION Closing the connection to the server. The lpvStatusInformation parameter is NULL.
INTERNET_STATUS_CONNECTED_TO_SERVER Successfully connected to the socket address (SOCKADDR) pointed to by lpvStatusInformation.
INTERNET_STATUS_CONNECTING_TO_SERVER Connecting to the socket address (SOCKADDR) pointed to by the lpvStatusInformationparameter.
INTERNET_STATUS_CONNECTION_CLOSED Successfully closed the connection to the server. The lpvStatusInformationparameter is NULL.
INTERNET_STATUS_CTL_RESPONSE_RECEIVED Not implemented.
INTERNET_STATUS_DETECTING_PROXY Notifies the client application that a proxy has been detected.
INTERNET_STATUS_HANDLE_CLOSING This handle value has been terminated.
INTERNET_STATUS_HANDLE_CREATED Used by the InternetConnectfunction to indicate it has created the new handle. This lets the application call the InternetCloseHandlefunction from another thread, if the connect is taking too long. The lpvStatusInformationparameter contains the address of an INTERNET_ASYNC_RESULTstructure.
INTERNET_STATUS_INTERMEDIATE_RESPONSE Received an intermediate (100 level) status code message from the server.
INTERNET_STATUS_NAME_RESOLVED Successfully found the IP address of the name contained in the lpvStatusInformationparameter.
INTERNET_STATUS_PREFETCH Not implemented.
INTERNET_STATUS_RECEIVING_RESPONSE Waiting for the server to respond to a request. The lpvStatusInformationparameter is NULL.
INTERNET_STATUS_REDIRECT An HTTP request is about to automatically redirect the request. The lpvStatusInformationparameter points to the new URL. At this point, the application can read any data returned by the server with the redirect response and can query the response headers. It can also cancel the operation by closing the handle. This callback is not made if the original request specified INTERNET_FLAG_NO_AUTO_REDIRECT.
INTERNET_STATUS_REQUEST_COMPLETE An asynchronous operation has been completed. The lpvStatusInformationparameter contains the address of an INTERNET_ASYNC_RESULTstructure.
INTERNET_STATUS_REQUEST_SENT Successfully sent the information request to the server. The lpvStatusInformation parameter points to a DWORDcontaining the number of bytes sent.
INTERNET_STATUS_RESOLVING_NAME Looking up the IP address of the name contained in the lpvStatusInformationparameter.
INTERNET_STATUS_RESPONSE_RECEIVED Successfully received a response from the server. The lpvStatusInformationparameter points to a DWORDcontaining the number of bytes received.
INTERNET_STATUS_SENDING_REQUEST Sending the information request to the server. The lpvStatusInformationparameter is NULL.
INTERNET_STATUS_STATE_CHANGE Moved between a secure (HTTPS) site and a nonsecure (HTTP) site. This can be one of the following values:

INTERNET_STATE_CONNECTED

Connected state (mutually exclusive with disconnected state).

INTERNET_STATE_DISCONNECTED

Disconnected state. No network connection could be established.

INTERNET_STATE_DISCONNECTED_BY_USER

Disconnected by user request.

INTERNET_STATE_IDLE

No network requests are being made by the Microsoft Win32 Internet functions.

INTERNET_STATE_BUSY

Network requests are being made by the Win32 Internet functions.

INTERNET_STATUS_USER_INPUT_REQUIRED

The request requires user input to be completed.

lpvStatusInformation
[in] Address of a buffer that contains information pertinent to this call to the callback function.
dwStatusInformationLength
[in] Unsigned long integer value that contains the size, in TCHARs, of the lpvStatusInformationbuffer.

Return Values

None.

Remarks

Because callbacks are made during processing of the request, the application should spend as little time as possible in the callback function to avoid degrading data throughput on the network. For example, displaying a dialog box in a callback function can be such a lengthy operation that the server terminates the request.

The callback function can be called in a thread context different from the thread that initiated the request.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.12 and later Wininet.h   Wininet.lib
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

INTERNET_ASYNC_RESULT, InternetConnect, InternetCloseHandle