Click to return to the Networking, Protocols     
UrlMkGetSessionOption Fun...     URLOpenBlockingStream Fun...     URL Monikers Functions    
Web Workshop  |  Networking, Protocols & Data Formats

UrlMkSetSessionOption Function


Sets options for the current Internet session.

Syntax

HRESULT UrlMkSetSessionOption(
    DWORD dwOption,
    LPVOID pBuffer,
    DWORD dwBufferLength,
    DWORD dwReserved
);

Parameters

dwOption
[in] Unsigned long integer value that contains the option to be set. This can be one of the following values:

INTERNET_OPTION_PROXY Sets the proxy settings. pBuffer must contain an INTERNET_PROXY_INFO structure. INTERNET_OPTION_PROXY and INTERNET_PROXY_INFO are defined in the Wininet.h file. For more information, see the Microsoft Win32 Internet Functions Reference.
INTERNET_OPTION_REFRESH Sets the value that determines if the proxy information can be reread from the registry. The value TRUE indicates that the proxy information can be reread from the registry. For more information on this value, see the Microsoft Win32 Internet Functions Reference.
URLMON_OPTION_USERAGENT Sets the user agent string for this process.
URLMON_OPTION_USERAGENT_REFRESH Refreshes the user agent string from the registry for this process.

pBuffer
[in] Address of the buffer containing the new session settings.
dwBufferLength
[in] Unsigned long integer value that contains the size of pBuffer.
dwReserved
[in] Reserved for future use. Must be set to zero.

Return Value

Returns S_OK if options were successfully set, or E_INVALIDARG if one of the parameters is invalid.

Remarks

This function maps directly to the Microsoft® Windows® Internet function InternetSetOption, although UrlMkSetSessionOption allows only global options to be set.

To use this function, the client code must include the Wininet.h header file, which declares values for the dwOption parameter and structures for the pBuffer parameter.

Function Information

Windows NT Use version 4.0. Implemented as an ANSI function.
Windows Use Windows 95 and later. Implemented as an ANSI function.
Header Urlmon.h
Import Library Urlmon.lib
Minimum availability Internet Explorer 3.0


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.