StrongNameTokenFromAssembly Function

Creates a strong name token from the specified assembly file.

BOOLEAN StrongNameTokenFromAssembly (
        [in]  LPCWSTR   wszFilePath,
        [out] BYTE      **ppbStrongNameToken,
        [out] ULONG     *pcbStrongNameToken


Parameter Description


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


[out] The returned strong name token.


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

true on successful completion; otherwise, false.

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 StrongNameFreeBuffer Function function to release the allocated memory.

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

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

Community Additions