Condividi tramite


CompareSecurityIds function

Compares two security identifiers (SIDs) for equivalence.

Syntax

HRESULT CompareSecurityIds(
             BYTE  *pbSecurityId1,
             DWORD dwLen1,
             BYTE  *pbSecurityId2,
             DWORD dwLen2,
  _Reserved_ DWORD dwReserved
);

Parameters

  • pbSecurityId1
    A pointer to a byte value that identifies the first SID.

  • dwLen1
    An unsigned long integer value that contains the first SID array length.

  • pbSecurityId2
    A pointer to a byte value that identifies the second SID.

  • dwLen2
    An unsigned long integer value that contains the second SID array length.

  • dwReserved
    Reserved. Must be set to 0.

Return value

Returns one of the following values.

Return code Description
S_OK

The SIDs match.

S_FALSE

The SIDs do not match.

E_INVALIDARG

Not a valid SID.

 

Remarks

Only the domain names of both SIDs are considered for a match. You can compare Domain Name System (DNS) or Internationalized Domain Name (IDN) URLs, but not SIDs generated from an IP address or intranet sites.

If one SID is derived from a Mark of the Web, both must be.

Requirements

Minimum supported client

Windows XP with SP2

Minimum supported server

Windows Server 2003

Product

Internet Explorer 6.0

Header

Urlmon.h

Library

Urlmon.lib

DLL

Urlmon.dll

See also

IInternetSecurityManager::GetSecurityId