IInternetHostSecurityManager::GetSecurityId method

Geta the security identification of the host.


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


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.


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


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.


Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server



See also