Skip to content

Latest commit

 

History

History
71 lines (48 loc) · 1.7 KB

UrlMkGetSessionOption.md

File metadata and controls

71 lines (48 loc) · 1.7 KB

Home

Function name : UrlMkGetSessionOption

Group: URL Monikers - Library: urlmon


Retrieves options for the current Internet session.


Code examples:

Obtaining current Internet Explorer browser version and UserAgent

Declaration:

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

FoxPro declaration:

DECLARE INTEGER UrlMkGetSessionOption IN urlmon;
	INTEGER   dwOption,;
	STRING  @ pBuffer,;
	INTEGER   dwBufferLen,;
	INTEGER @ pdwBufferLen,;
	INTEGER   dwReserved
  

Parameters:

dwOption [in] Unsigned long integer value containing the session options to be retrieved.

pBuffer [in] Pointer to the buffer containing the session settings to be retrieved.

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

pdwBufferLength [out] 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 was insufficient.

dwReserved [in] Reserved. Must be set to 0.


Return value:

Returns one of the following values: S_OK, E_FAIL, E_INVALIDARG


Comments:

Being called with dwOption = URLMON_OPTION_USERAGENT this function returns current User Agent string.

Even if this function returns an error code, check pdwBufferLength parameter. If it is not zero then there is some result returned in pBuffer.