ICLRStrongName::StrongNameTokenFromAssembly Method

.NET Framework (current version)
 

Creates a strong name token from the specified assembly file.

HRESULT StrongNameTokenFromAssembly (  
    [in]  LPCWSTR   wszFilePath,  
    [out] BYTE      **ppbStrongNameToken,  
    [out] ULONG     *pcbStrongNameToken  
);  

Parameters

wszFilePath
[in] The path to the portable executable (PE) file for the assembly.

ppbStrongNameToken
[out] The returned strong name token.

pcbStrongNameToken
[out] The size, in bytes, of the strong name token.

S_OK if the method completed successfully; otherwise, an HRESULT value that indicates failure (see Common HRESULT Values for a list).

A strong name token is the shortened form of a public key. The token is a 64-bit hash that is created from the public key used to sign the assembly. The token is a part of the strong name for the assembly, and can be read from the assembly metadata.

After the token is created, you should call the ICLRStrongName::StrongNameFreeBuffer method to release the allocated memory.

Platforms: See System Requirements.

Header: MetaHost.h

Library: Included as a resource in MSCorEE.dll

.NET Framework Versions: Available since 4

StrongNameTokenFromAssemblyEx Method
ICLRStrongName Interface

Show: