Purpose
Gets the status code associated with an HTTP request.
Syntax
MIQueryInfoStatusCode( ByVal hFile As CHttpFile, pStatusCode As Integer
s SmallInt
hFile is a CHttpFile handle.
pStatusCode is a reference to an integer that receives the status code. Status codes indicate the success or failure of the requested event. HTTP status codes fall into groups indicating the success or failure of the request. The following tables outline the status code groups and the most common HTTP status codes.
Group | Meaning |
---|---|
200-299 | Success |
300-399 | Information |
400-499 | Request error |
500-599 | Server error |
Status code | Meaning |
---|---|
200 | URL located, transmission follows. |
400 | Unintelligible request. |
404 | Requested URL not found. |
405 | Server does not support requested method. |
500 | Unknown server error. |
503 | Server capacity reached. |
Return Value
Nonzero if successful; otherwise 0. To determine the cause of the failure, call the MIGetErrorMessage() function.
Description
Use this function to get the status code associated with an HTTP request. For information, refer to the Microsoft MSDN library.