INTERNET_STATUS_CALLBACK
A version of this page is also available for
4/8/2010
This function is a prototype for an application-defined status callback function.
Syntax
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 hInternet parameter.
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 this parameter.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 lpvStatusInformation parameter.
INTERNET_STATUS_CONNECTION_CLOSED
Successfully closed the connection to the server. The lpvStatusInformation parameter 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 InternetConnect function to indicate it has created the new handle. This allows the application call the InternetCloseHandle function from another thread, if the connect is taking too long. The lpvStatusInformation parameter contains the address of an INTERNET_ASYNC_RESULT structure.
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 lpvStatusInformation parameter.
INTERNET_STATUS_PREFETCH
Not implemented.
INTERNET_STATUS_RECEIVING_RESPONSE
Waiting for the server to respond to a request. The lpvStatusInformation parameter is NULL.
INTERNET_STATUS_REDIRECT
An HTTP request is about to automatically redirect the request. The lpvStatusInformation parameter 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 lpvStatusInformation parameter contains the address of an INTERNET_ASYNC_RESULT structure.
INTERNET_STATUS_REQUEST_SENT
Successfully sent the information request to the server. The lpvStatusInformation parameter points to a DWORD containing the number of bytes sent.
INTERNET_STATUS_RESOLVING_NAME
Looking up the IP address of the name contained in the lpvStatusInformation parameter.
INTERNET_STATUS_RESPONSE_RECEIVED
Successfully received a response from the server. The lpvStatusInformation parameter points to a DWORD containing the number of bytes received.
INTERNET_STATUS_SENDING_REQUEST
Sending the information request to the server. The lpvStatusInformation parameter is NULL.
INTERNET_STATUS_SSL_NEGOTIATION_COMPLETE
Indicates that the SSL negotiation was successful.
INTERNET_STATUS_STATE_CHANGE
Moved between a secure (HTTPS) site and a nonsecure (HTTP) site. The following list shows the possible values. This can be one of these 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 WinInet functions.
- INTERNET_STATE_BUSY
Network requests are being made by the WinInet functions.
- INTERNET_STATUS_USER_INPUT_REQUIRED
The request requires user input to be completed.
- INTERNET_STATE_CONNECTED
- 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 lpvStatusInformation buffer.
Return Value
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
Header | Developer Implemented |
Windows Embedded CE | Windows CE 2.12 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |
See Also
Reference
InternetConnect
InternetCloseHandle
INTERNET_ASYNC_RESULT
WinInet Functions