EmitAssemblyCustomAttribute 方法

更新:2007 年 11 月

调用该方法以设置程序集级的自定义属性。

HRESULT EmitAssemblyCustomAttribute(
    mdAssembly   AssemblyID,
    mdToken      FileToken,
    mdToken      tkType,
    void const*  pCustomValue,
    DWORD        cbCustomValue,
    BOOL         bSecurity,
    BOOL         bAllowMulti
) PURE;

参数

  • AssemblyID
    程序集的 ID。

  • FileToken
    定义属性的文件。如果 AssemblyID 未指示未绑定网络模块,则可以为 NULL。

  • tkType
    自定义属性的类型。

  • pCustomValue
    自定义值数据。

  • cbCustomValue
    自定义值数据的长度。

  • bSecurity
    如果自定义属性与程序集签名相关,则为 TRUE。

  • bAllowMulti
    如果要发出多个属性,则为 TRUE。

返回值

如果此方法成功,则返回 S_OK。

要求

需要 alink.h

请参见

概念

ALink API(非托管 API 参考)

其他资源

IALink 接口

IALink2 接口