Freigeben über


IInternetHostSecurityManager::GetSecurityId method

Geta the security identification of the host.

Syntax

HRESULT GetSecurityId(
  [out]     BYTE      *pbSecurityId,
  [in, out] DWORD     *pcbSecurityId,
  [in]      DWORD_PTR dwReserved
);

Parameters

  • pbSecurityId [out]
    A pointer to a buffer that specifies the scheme, domain name, and zone of the host.

  • pcbSecurityId [in, out]
    A pointer to an unsigned long integer value that specifies the size of the buffer being passed in.

  • dwReserved [in]
    Reserved. Must be set to NULL.

Return value

Returns S_OK if successful, or E_INVALIDARG if the buffer is set to NULL.

Remarks

If successful, pbSecurityId contains the scheme, domain, and zone information in the following format.

<scheme>:<domain>+<zone>

The pcbSecurityId parameter contains the actual size of the data stored in the buffer.

Security Warning: Failure to use this method to obtain a security ID can compromise the security of your application. The default implementation should handle the formation of IDs when possible. If you generate your own security ID there might be differences from IDs that are generated by IInternetHostSecurityManager::GetSecurityId which an attacker might exploit.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

DLL

Urlmon.dll

See also

IInternetHostSecurityManager