Partilhar via


StrongNameSignatureVerificationFromImage Function

Verifies that an assembly that has already been mapped to memory is valid for the associated public key.

BOOLEAN StrongNameSignatureVerificationFromImage (
        [in]  BYTE    *pbBase,
        [in]  DWORD   dwLength,
        [in]  DWORD   dwInFlags,
        [out] DWORD   *pdwOutFlags
);

Parameters

  • pbBase
    [in] The relative virtual address of the mapped assembly manifest.

  • dwLength
    [in] The size, in bytes, of the mapped image.

  • dwInFlags
    [in] Flags that influence verification behavior. The following values are supported:

    • SN_INFLAG_FORCE_VER (0x00000001) - Forces verification even if it is necessary to override registry settings.

    • SN_INFLAG_INSTALL (0x00000002) - Specifies that this is the first verification performed on this image.

    • SN_INFLAG_ADMIN_ACCESS (0x00000004) - Specifies that the cache will allow access only to users who have administrative privileges.

    • SN_INFLAG_USER_ACCESS (0x00000008) - Specifies that the assembly will be accessible only to the current user.

    • SN_INFLAG_ALL_ACCESS (0x00000010) - Specifies that the cache will provide no guarantees of access restriction.

    • SN_INFLAG_RUNTIME (0x80000000) - Reserved for internal debugging.

  • pdwOutFlags
    [out] A flag for additional output information. The following value is supported:

    • SN_OUTFLAG_WAS_VERIFIED (0x00000001) - This value is set to false to specify that the verification succeeded due to registry settings.

Return Value

true on successful completion; otherwise, false.

Remarks

If the StrongNameSignatureVerificationFromImage function does not complete successfully, call the StrongNameErrorInfo function to retrieve the last generated error.

Requirements

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: StrongName.h

Library: Included as a resource in mscoree.dll

.NET Framework Version: 2.0, 1.1, 1.0

See Also

Concepts

Strong Naming Global Static Functions