Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function gets options for the current Internet session.

Syntax

HRESULT UrlMkGetSessionOption(
  DWORD 
dwOption,
  LPVOID 
pBuffer,
  DWORD 
dwBufferLength,
  DWORD* 
pdwBufferLength,
  DWORD 
dwReserved
);

Parameters

dwOption

[in] Unsigned long integer value containing the session options to be retrieved. This can be one of the values shown in the following table.

Value Description

URLMON_OPTION_URL_ENCODING

Retrieve the Microsoft Internet Explorer default encoding policy. This value was introduced in Internet Explorer 5.

URLMON_OPTION_USERAGENT

Retrieve the current user agent string.

pBuffer

[in] Address of the buffer containing the new session settings.

dwBufferLength

[in] Unsigned long integer value containing the size of pBuffer.

pdwBufferLength

[out] Address of an unsigned long integer value containing the size of the data stored in the buffer or the size required to store the data if the buffer size was insufficient.

dwReserved

[in] Reserved. Must be set to zero.

Return Value

This function returns one of the values shown in the following table.

Value Description

S_OK

The option was successfully set.

E_INVALIDARG

The option is not supported or there is an invalid parameter.

E_FAIL

The option could not be set.

Requirements

Header urlmon.h, urlmon.idl
Library urlmon.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later