Udostępnij za pośrednictwem


UrlMkGetSessionOption function

Gets options for the current Internet session.

Syntax

HRESULT UrlMkGetSessionOption(
  _In_       DWORD                                                            dwOption,
  _In_       __out_bcount_part_opt(dwBufferLength,*pdwBufferLengthOut) LPVOID pBuffer,
  _In_       DWORD                                                            dwBufferLength,
  _Out_      __out DWORD                                                      *pdwBufferLengthOut,
  _Reserved_ __reserved DWORD                                                 dwReserved
);

Parameters

dwOption [in]

An unsigned long integer value containing the session options to retrieve. This can be one of the following values.

URLMON_OPTION_URL_ENCODING

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

URLMON_OPTION_USERAGENT

Gets the current user agent string.

URLMON_OPTION_USE_BINDSTRINGCREDS

Gets a value that indicates whether it is safe to pass credentials to URLMON. Always returns 1.

URLMON_OPTION_USE_BROWSERAPPSDOCUMENTS

Gets a value that indicates whether URLMON accepts browser application documents. Always returns 1.

pBuffer [in]

A pointer to the buffer containing the new session settings.

dwBufferLength [in]

An unsigned long integer value containing the size of pBuffer.

pdwBufferLengthOut [out]

A pointer to 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 is insufficient.

dwReserved [in]

Reserved. Must be set to 0.

Return value

Returns one of the following values.

Return code 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 cannot be set.

 

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Product

Internet Explorer 3.0

Header

Urlmon.h

Library

Urlmon.lib

DLL

Urlmon.dll