📄 test1.idl
字号:
// Test1.idl : IDL source for Test1.dll
//
// This file will be processed by the MIDL tool to
// produce the type library (Test1.tlb) and marshalling code.
import "oaidl.idl";
import "ocidl.idl";
[
object,
uuid(DC8C9DEC-A7BC-44D9-96E5-B7A6B4A59D6C),
helpstring("IFun Interface"),
pointer_default(unique)
]
interface IFun : IUnknown
{
[helpstring("method Add")] HRESULT Add([in] long n1, [in] long n2, [out, retval] long *pVal);
};
[
object,
uuid(B9D75722-1950-405b-8BB6-9788A6DB1DB2),
helpstring("IFun2 Interface"),
pointer_default(unique)
]
interface IFun2 : IFun
{
[helpstring("method Sub")] HRESULT Sub([in] long n1, [in] long n2, [out, retval] long *pVal);
};
[
uuid(C1B7A657-C24C-4A5E-AC76-72E8DC8235F1),
version(1.0),
helpstring("Test1 1.0 Type Library")
]
library TEST1Lib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
[
uuid(D85BF4AA-3CB9-464E-BC48-BDCEC7D8B2E7),
helpstring("CalCulate Class")
]
coclass CalCulate
{
interface IFun;
[default] interface IFun2;
};
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -