DELTAPLC.idl
资源名称:DELTA_PLC.rar [点击查看]
上传用户:hailongwei
上传日期:2020-11-29
资源大小:5839k
文件大小:2k
源码类别:
单片机开发
开发平台:
Visual C++
- // DELTAPLC.idl : DELTAPLC 的 IDL 源
- //
- // 此文件将由 MIDL 工具处理以
- // 产生类型库(DELTAPLC.tlb)和封送处理代码。
- #include "olectl.h"
- import "oaidl.idl";
- import "ocidl.idl";
- [
- object,
- uuid(2B38B597-89F5-4E43-A625-74BFD7956D7C),
- dual,
- nonextensible,
- helpstring("IMSegment 接口"),
- pointer_default(unique)
- ]
- interface IMSegment : IDispatch{
- [propget, bindable, requestedit, id(DISPID_HWND)]
- HRESULT HWND([out, retval]LONG_PTR* pHWND);
- [id(1), helpstring("联机")] HRESULT OpenLink([in] LONG Comport,[in] BSTR CommString);
- [id(2), helpstring("脱机")] HRESULT CloseLink(void);
- [id(3), helpstring("读取联机状态")] HRESULT GetLink([out,retval] VARIANT_BOOL* pVal);
- [id(4), helpstring("读取寄存器")] HRESULT GetBit([in] LONG Addr, [out, retval] VARIANT_BOOL* pVal);
- [id(5), helpstring("写入寄存器")] HRESULT PutBit([in] LONG Addr, [in] VARIANT_BOOL OnOff);
- [id(6), helpstring("延时")] HRESULT Delay([in] LONG TimeSpan);
- [id(7), helpstring("通知信号变化")] HRESULT SetNotify([in] LONG Addr, [in] VARIANT_BOOL AllowNotify);
- };
- [
- uuid(BC6B1E87-316D-4BE1-8036-7020FD51755D),
- version(1.0),
- helpstring("ActiveX for DELTA PLC M Segment")
- ]
- library DELTAPLCLib
- {
- importlib("stdole2.tlb");
- [
- uuid(2D03C052-A6EF-4F2B-A24C-7BB542C6D365),
- helpstring("_IMSegment事件接口")
- ]
- dispinterface _IMSegmentEvents
- {
- properties:
- methods:
- [id(1)] HRESULT OnNotify([in] LONG Addr);
- [id(2)] HRESULT OnLink([in] VARIANT_BOOL LinkStatus);
- };
- [
- uuid(7F89CA20-5EF8-4614-8702-E58F473FBDD7),
- helpstring("MSegment Class")
- ]
- coclass MSegment
- {
- [default] interface IMSegment;
- [default, source] dispinterface _IMSegmentEvents;
- };
- };