InternetGetLastResponseInfoInternetGetLastResponseInfo*
*Contents  *Index  *Topic Contents
*Previous Topic: InternetFindNextFile
*Next Topic: InternetLockRequestFile

InternetGetLastResponseInfo

BOOL InternetGetLastResponseInfo(
    OUT LPDWORD lpdwError,
    OUT LPSTR lpszBuffer,
    IN OUT LPDWORD lpdwBufferLength
);

Retrieves the last Win32 Internet function error description or server response on the thread calling this function.

lpdwError
Address of a variable that receives an error message pertaining to the operation that failed.
lpszBuffer
Address of a buffer that receives the error text.
lpdwBufferLength
Size of the lpszBuffer buffer. When the function returns, this parameter contains the size of the string written to the buffer.

The FTP and Gopher protocols can return additional text information along with most errors. This extended error information can be retrieved by using the InternetGetLastResponseInfo function whenever GetLastError returns ERROR_INTERNET_EXTENDED_ERROR (occurring after an unsuccessful function call).

The buffer pointed to by lpszBuffer must be large enough to hold both the error string and a zero terminator at the end of the string. However, note that the value returned in lpdwBufferLength does not include the terminating zero.

InternetGetLastResponseInfo can be called multiple times until another Win32 Internet function is called on this thread. When another function is called, the internal buffer that is storing the last response information is cleared.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.