Export (0) Print
Expand All

CInternetSession::QueryOption 

Provides five possible asserts for basic error-checking.


BOOL QueryOption(
   DWORD dwOption,
   LPVOID lpBuffer,
   LPDWORD lpdwBufLen 
) const;
BOOL QueryOption(
   DWORD dwOption,
   DWORD& dwValue 
) const;

Parameters

dwOption

The Internet option to query. See Option Flags in the Platform SDK for a list of the possible options.

lpBuffer

A buffer that receives the option setting.

lpdwBufLen

A pointer to a DWORD containing the length of lpBuffer. On return, this contains the length of the data placed into lpBuffer.

dwValue

Sent to QueryOption in place of lpBuffer.

If the operation was successful, a value of TRUE is returned. If an error occurred, a value of FALSE is returned. If the call fails, the Win32 function GetLastError may be called to determine the cause of the error.

See CInternetSession::SetOption to select and set the specific option to query.

The possible settings for INTERNET_OPTION_HANDLE_TYPE include the following:

  • INTERNET_HANDLE_TYPE_INTERNET

  • INTERNET_HANDLE_TYPE_CONNECT_FTP

  • INTERNET_HANDLE_TYPE_CONNECT_GOPHER

  • INTERNET_HANDLE_TYPE_CONNECT_HTTP

  • INTERNET_HANDLE_TYPE_FTP_FIND

  • INTERNET_HANDLE_TYPE_FTP_FIND_HTML

  • INTERNET_HANDLE_TYPE_FTP_FILE

  • INTERNET_HANDLE_TYPE_FTP_FILE_HTML

  • INTERNET_HANDLE_TYPE_GOPHER_FIND

  • INTERNET_HANDLE_TYPE_GOPHER_FIND_HTML

  • INTERNET_HANDLE_TYPE_GOPHER_FILE

  • INTERNET_HANDLE_TYPE_GOPHER_FILE_HTML

  • INTERNET_HANDLE_TYPE_HTTP_REQUEST

Note that the following form of this method has been deprecated (the two valid forms are shown in the syntax section above):

CInternetSession::QueryOption(DWORD dwOption, CString& refString);

Community Additions

ADD
Show:
© 2014 Microsoft