.idl与.odl的区别
来源:互联网 发布:通化教务网络管理系统 编辑:程序博客网 时间:2024/05/22 12:13
From: http://hi.baidu.com/%CD%E6%CA%AF%CD%B7%B5%C4%D0%A1%BA%A2/blog/item/1b9a942fe8cfcf594ec22629.html
1.
.odl和.idl在com中的功能相同.
前者是ActiveX中的 后者是ATL中.
可在前者的文件中 用 #import "XXXXX.idl" 的方式包含后者. 反过来没有试过.
2.
When using IDL, you must declare the interfaces that will generate the C++ source files outside of the library declaration. For the ODL, this step is not necessary. Other than a few minor language differences, the IDL and ODL are identical in terms of syntax and organization.
3.
ODL是Microsoft对IDL的扩展
4.
odl ---对象描述语言
idl ---接口描述语言
其实是一个功能就是在写法上有些不同,eg:
odl:
[
uuid(3C591B20-1F13-101B-B826-00DD01103DE1), // LIBID_Lines.
helpstring("Lines 1.0 Type Library"),
lcid(0x09),
version(1.0)
]
library Lines
{
importlib("stdole.tlb");
[
uuid(3C591B25-1F13-101B-B826-00DD01103DE1), // IID_Ipoint.
helpstring("Point object."),
oleautomation,
dual
]
interface IPoint : IDispatch
{
[propget, helpstring("Returns and sets x coordinate.")]
HRESULT x([out, retval] int* retval);
[propput, helpstring("Returns and sets x coordinate.")]
HRESULT x([in] int Value);
[propget, helpstring("Returns and sets y coordinate.")]
HRESULT y([out, retval] int* retval);
[propput, helpstring("Returns and sets y coordinate.")]
HRESULT y([in] int Value);
}
[
uuid(3C591B21-1F13-101B-B826-00DD01103DE1), // CLSID_Lines.
helpstring("Lines Class"),
appobject
]
coclass Lines
{
[default] interface IPoint;
interface IDispatch;
}
}
idl:
[
uuid(3C591B25-1F13-101B-B826-00DD01103DE1), // IID_Ipoint.
helpstring("Point object."),
oleautomation,
dual
]
interface IPoint : IDispatch
{
[propget, helpstring("Returns and sets x coordinate.")]
HRESULT x([out, retval] int* retval);
[propput, helpstring("Returns and sets x coordinate.")]
HRESULT x([in] int Value);
[propget, helpstring("Returns and sets y coordinate.")]
HRESULT y([out, retval] int* retval);
[propput, helpstring("Returns and sets y coordinate.")]
HRESULT y([in] int Value);
}
[
uuid(3C591B20-1F13-101B-B826-00DD01103DE1), // LIBID_Lines.
helpstring("Lines 1.0 Type Library"),
lcid(0x09),
version(1.0)
]
library Lines
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
[
uuid(3C591B21-1F13-101B-B826-00DD01103DE1), // CLSID_Lines.
helpstring("Lines Class"),
appobject
]
coclass Lines
{
[default] interface IPoint;
interface IDispatch;
}
}
- .idl与.odl的区别
- .idl与.odl的区别
- ActiveX .idl与.odl的区别
- 添加atl类的时候出现 no idl/odl file with the library statement found
- IDL与Matlab的比较
- IDL与Matlab的比较
- IDL与Matlab的比较
- IDL与Matlab的比较
- odl安装的一些坑
- Java IDL与javaRMI
- ENVI\IDL 与C# 混编时的问题
- ENVI/IDL与ArcGIS Engine一体化开发的实现
- IDL中与文件相关的函数和过程
- SDN 下用ODL实现QoS保障(4)-OVS与ODL交互
- TAO IDL的编译
- IDL设计的别扭
- IDL文件的编写
- IDL 全局变量的变化
- 黑马程序员----关系数据库的范式
- 网站无法登陆,原因在于IP因网站未备案被限制
- 手机连接eclipse
- 委托Delegate使用帮助
- ubuntu下android源代码以及内核的获取
- .idl与.odl的区别
- Linux内核跟踪之ring buffer的实现
- icould bookmarks sync problem with Internet Explorer
- 介绍 JSON
- andorid 记录,以后看
- AS3中Timer,setTimeout,setInterval对gc的对比
- 由于未能创建 Microsoft Visual C# 2008 编译器,因此未能打开项目 "xxx"
- 开启“掌”控IT新时代——CIO搞定年终总结,就这么简单!
- Chrome工程师: Firefox是合作伙伴,而