描述:
// HRAccess.idl : IDL source for HRAccess.dll
//
// This file will be processed by the MIDL tool to
// produce the type library (HRAccess.tlb) and marshalling code.
import "oaidl.idl";
import "ocidl.idl";
[
uuid(8546BA76-4191-472B-8E65-E4221FBF0530),
version(1.0),
helpstring("HRAccess 1.0 Type Library")
]
library HRACCESSLib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
importlib("D:\Program Files\Common Files\System\Ado\Msado15.dll");
// _IHRConnectionEvents Interface Defination
[
uuid(C3C0A948-5A01-4789-A61A-86D9ECEFB113),
helpstring("_IHRConnectionEvents Interface")
]
dispinterface _IHRConnectionEvents
{
properties:
methods:
};
// _IHRDatasetEvents Interface Defination
[
uuid(B5796284-6381-4A1D-B468-B9774B13EAA0),
helpstring("_IHRDatasetEvents Interface")
]
dispinterface _IHRDatasetEvents
{
properties:
methods:
};
// IHRConnection Interface Defination
[
object,
uuid(69108D37-94DF-408B-854C-C6A697C3BB6D),
dual,
helpstring("IHRConnection Interface"),
pointer_default(unique)
]
interface IHRConnection : IDispatch
{
[propget, id(1), helpstring("property ConnString")] HRESULT ConnString([out, retval] BSTR *pVal);
[propput, id(1), helpstring("property ConnString")] HRESULT ConnString([in] BSTR newVal);
[id(2), helpstring("method InitConnection")] HRESULT InitConnection();
[id(3), helpstring("method CloseConnection")] HRESULT CloseConnection();
};
// IHRDataset Interface Defination
[
object,
uuid(648E4611-F6C6-4469-AB88-2B61E0D4B1CD),
dual,
helpstring("IHRDataset Interface"),
pointer_default(unique)
]
interface IHRDataset : IDispatch
{
[propget, id(1), helpstring("property Connection")] HRESULT Connection([out, retval] IHRConnection * *pVal);
[propput, id(1), helpstring("property Connection")] HRESULT Connection([in] IHRConnection * newVal);
};
// HRConnection Class Defination
[
uuid(AA48D03C-7284-438A-91AC-A8E442055038),
helpstring("HRConnection Class")
]
coclass HRConnection
{
[default] interface IHRConnection;
[default, source] dispinterface _IHRConnectionEvents;
};
// HRConnection Class Defination
[
uuid(6C0A57BC-7287-43EC-AB23-1DAE832768D1),
helpstring("HRDataset Class")
]
coclass HRDataset
{
[default] interface IHRDataset;
[default, source] dispinterface _IHRDatasetEvents;
};
};
这是接口的IDL文件. 我想知道. 怎么让IHRDataset接口能取到IHRConnection接口的对象当前值. 也就是当前IHRConnection接口中的值. 是不是要一个这样的Method:
就像ADO一样. 我可以得到接口的指针!