zoukankan      html  css  js  c++  java
  • To consume a managed type from COM 之二 Referencing .NET Types from COM

    Referencing .NET Types from COM
    .NET Framework Developer's Guide
    Referencing .NET Types from COM

    From the point of view of client and server code, the differences between COM and the .NET Framework are largely invisible. Microsoft Visual Basic clients can view a .NET object in the object browser, which exposes the object methods and syntax, properties, and fields exactly as if it were any other COM object.

    The process for importing a type library is slightly more complicated for C++ clients, although you use the same tools to export metadata to a COM type library. To reference .NET object members from an unmanaged C++ client, reference the TLB file (produced with Tlbexp.exe) with the #import directive. When referencing a type library from C++, you must either specify the raw_interfaces_only option or import the definitions in the base class library, Mscorlib.tlb.

    To import a library without Mscorlib.tlb

    [C++]
    #import "..\LoanLib\LoanLib.tlb" raw_interfaces_only

    To import a library with Mscorlib.tlb

    [C++]
    #import "mscorlib.tlb"
    #import "..\LoanLib\LoanLib.tlb"
  • 相关阅读:
    高可用性GRE+IPSEC中心—分支
    高可用性GRE+IPSEC中心—分支
    高可用性GRE+IPSEC中心—分支
    mysql数据库移植
    mysql数据库移植
    mysql数据库移植
    mysql数据库移植
    Linux 查看进程资源--ps、top命令
    比特币底层设计剖析
    比特币的P2P网络协议
  • 原文地址:https://www.cnblogs.com/MayGarden/p/1633953.html
Copyright © 2011-2022 走看看