zoukankan      html  css  js  c++  java
  • Exposing COM Components to the .NET Framework之四Deploy an interop application

    Deploying an Interop Application

    An interop application typically includes a .NET client assembly, one or more interop assemblies representing distinct COM type libraries, and one or more registered COM components. The .NET Framework SDK provides tools to import and convert a type library to an interop assembly. You must ship the interop assembly with the other assemblies that make up your application.

    Assemblies can have strong names. A strong-named assembly includes the publisher's public key, which provides a unique identity. Assemblies produced by the Type Library Importer (Tlbimp.exe) can be signed by the publisher using the /keyfile option. You can install signed assemblies into the global assembly cache. Unsigned assemblies must be installed on the user's machine as private assemblies.

    Private Assemblies

    To install an assembly to be used privately, both the application EXE and the interop assembly containing imported COM types must be installed in the same directory structure. The following illustration shows an unsigned interop assembly to be used privately by Client1.exe and Client2.exe, which reside in separate application directories. The interop assembly, which is called LOANLib.dll in this example, is installed twice.

    Directory structure and registry entries for a private deployment

    All COM components associated with the application must be installed in the Windows registry. If Client1.exe and Client2.exe in the illustration are installed on different computers, you must register the COM components on both computers.

    Shared Assemblies

    Assemblies shared by multiple applications should be installed in a centralized repository called the global assembly cache. .NET clients can access the same copy of the interop assembly, which is signed and installed in the global assembly cache.

  • 相关阅读:
    WPF控件模型
    WPF布局之Canvas
    WPF布局之Grid
    WPF布局之Panel
    cxGrid让指定的某行自动呈选选中的状态
    VMware Esxi5.5中嵌套虚拟机的网络设置方法
    SQLServer (2005/2008) 日志清理方法
    控制cxGrid 主从表的明细只展开一个
    关于Delphi cxGrid主从表中从表只能编辑第一条记录的问题
    自动化工程师面试常见问题
  • 原文地址:https://www.cnblogs.com/MayGarden/p/1630983.html
Copyright © 2011-2022 走看看