📄 complus.idl
字号:
// comPlus.idl : comPlus 的 IDL 源
//
// 此文件将由 MIDL 工具处理以
// 产生类型库(comPlus.tlb)和封送处理代码。
#include "mtxattr.h"
import "oaidl.idl";
import "ocidl.idl";
[
object,
uuid(a817e7a2-43fa-11d0-9e44-00aa00b6770a),
dual,
helpstring("IComponentRegistrar 接口"),
pointer_default(unique)
]
interface IComponentRegistrar : IDispatch
{
[id(1)] HRESULT Attach([in] BSTR bstrPath);
[id(2)] HRESULT RegisterAll();
[id(3)] HRESULT UnregisterAll();
[id(4)] HRESULT GetComponents([out] SAFEARRAY(BSTR)* pbstrCLSIDs, [out] SAFEARRAY(BSTR)* pbstrDescriptions);
[id(5)] HRESULT RegisterComponent([in] BSTR bstrCLSID);
[id(6)] HRESULT UnregisterComponent([in] BSTR bstrCLSID);
};
[
object,
uuid(C24E2B99-8E52-4718-82DA-7984EE10B70E),
dual,
nonextensible,
QUEUEABLE,
helpstring("IPerson 接口"),
pointer_default(unique)
]
interface IPerson : IDispatch{
[id(1), helpstring("方法Add")] HRESULT Add(CHAR* name, LONG score, TCHAR* pResult);
};
[
uuid(0D093C73-BE89-4475-83F3-C8DBDF8DE013),
version(1.0),
helpstring("comPlus 1.0 类型库"),
custom(a817e7a1-43fa-11d0-9e44-00aa00b6770a,"{EEEF6C79-CE92-49C4-97A9-0C61002A2080}")
]
library comPlusLib
{
importlib("stdole2.tlb");
[
uuid(EEEF6C79-CE92-49C4-97A9-0C61002A2080),
helpstring("ComponentRegistrar 类")
]
coclass CompReg
{
[default] interface IComponentRegistrar;
};
[
uuid(46AD981D-42AC-4B5C-95FF-16FB59A87CDD),
custom(TLBATTR_TRANS_SUPPORTED,0),
helpstring("Person Class")
]
coclass Person
{
[default] interface IPerson;
};
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -