VC中的#import

在VC++中,#import指令用于从类型库中引入信息,并将其转换为C++类,主要描述COM接口。它接受文件名或ProgID、LibID,并可以配合多种属性来定制导入行为,如no_namespace、raw_interfaces_only等,处理名称冲突、智能指针生成、局部化等问题。
摘要由CSDN通过智能技术生成

 ms-help://MS.MSDNQTR.v80.chs/MS.MSDN.v80/MS.VisualStudio.v80.chs/dv_vclang/html/e0fc4564-b6cf-4a36-bf51-6ccd7abd0a94.htm
ms-help://MS.MSDNQTR.v80.chs/MS.MSDN.v80/MS.VisualStudio.v80.chs/dv_vclang/html/787d1112-e543-40d7-ab15-a63d43f4030a.htm
C++ Specific
Used to incorporate information from a type library. The content of the type library is converted into C++ classes, mostly describing the COM interfaces.
 
#import "filename" [attributes]
#import <filename> [attributes]


Parameters
filename
Allows you to specify which type library you want to import. filename can be one of the following:
A type library (.tlb or .odl). file:, which indicates type library, can precede each filename.

// The progid of a control in the type library. Note that progid: can precede each progid. For example:
#import "progid:my.prog.id.1.5"
 
// The library ID of the type library. Note that

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值