Queries an Internet option on the specified handle.
Syntax
BOOL InternetQueryOption( IN HINTERNET hInternet, IN DWORD dwOption, OUT LPVOID lpBuffer, IN OUT LPDWORD lpdwBufferLength );The actual syntax of this function varies between its ANSI and Unicode implementations. For more information, see Win32 Internet Functions Syntax.
Parameters
- hInternet
- HINTERNET handle on which to query information.
- dwOption
- Unsigned long integer value that contains the Internet option to query. This can be one of the Option Flags values.
- lpBuffer
- Address of a buffer that receives the option setting. Strings returned by InternetQueryOption are globally allocated, so the calling application must globally free the string when it is finished using it.
- lpdwBufferLength
- Address of an unsigned long integer variable that contains the length of lpBuffer, in TCHARs. When the function returns, the variable receives the length of the data placed into lpBuffer. If GetLastError returns ERROR_INSUFFICIENT_BUFFER, this parameter receives the number of bytes required to hold the created URL.
Return Value
Returns TRUE if successful, or FALSE otherwise. To get a specific error message, call GetLastError.
Remarks
GetLastError will return the ERROR_INVALID_PARAMETER if an option flag that is invalid for the specified handle type is passed to the dwOption parameter.
Function Information
Windows NT Use version 4.0. Implemented as ANSI and Unicode functions. Windows Use Windows 95 and later. Implemented as ANSI and Unicode functions. Header Wininet.h Import library Wininet.lib Minimum availability Internet Explorer 3.0 (ANSI only), 5 (ANSI and Unicode)
Windows CE
Windows CE Use version 2.12 and later. Implemented as ANSI and Unicode functions. Minimum availability Internet Explorer 4.0
See Also
Microsoft Win32 Internet Functions Overview, Common Functions, Microsoft Win32 Internet Functions Reference, General Win32 Internet Functions, FtpGetFile, FtpPutFile, InternetConnect, InternetOpen, InternetSetOption