?? opcda.idl
字號:
);
HRESULT CloneGroup(
[in, string] LPCWSTR szName,
[in] REFIID riid,
[out, iid_is(riid)] LPUNKNOWN * ppUnk
);
}
//****************************************************
[
object,
uuid(39c13a51-011e-11d0-9675-0020afd8adb3),
pointer_default(unique)
]
interface IOPCPublicGroupStateMgt : IUnknown
{
HRESULT GetState(
[out] BOOL * pPublic
);
HRESULT MoveToPublic(
void
);
}
//****************************************************
[
object,
uuid(39c13a52-011e-11d0-9675-0020afd8adb3),
pointer_default(unique)
]
interface IOPCSyncIO : IUnknown
{
HRESULT Read(
[in] OPCDATASOURCE dwSource,
[in] DWORD dwCount,
[in, size_is(dwCount)] OPCHANDLE * phServer,
[out, size_is(,dwCount)] OPCITEMSTATE ** ppItemValues,
[out, size_is(,dwCount)] HRESULT ** ppErrors
);
HRESULT Write(
[in] DWORD dwCount,
[in, size_is(dwCount)] OPCHANDLE * phServer,
[in, size_is(dwCount)] VARIANT * pItemValues,
[out, size_is(,dwCount)] HRESULT ** ppErrors
);
}
//****************************************************
[
object,
uuid(39c13a53-011e-11d0-9675-0020afd8adb3),
pointer_default(unique)
]
interface IOPCAsyncIO : IUnknown
{
HRESULT Read(
[in] DWORD dwConnection,
[in] OPCDATASOURCE dwSource,
[in] DWORD dwCount,
[in, size_is(dwCount)] OPCHANDLE * phServer,
[out] DWORD * pTransactionID,
[out, size_is(,dwCount)] HRESULT ** ppErrors
);
HRESULT Write(
[in] DWORD dwConnection,
[in] DWORD dwCount,
[in, size_is(dwCount)] OPCHANDLE * phServer,
[in, size_is(dwCount)] VARIANT * pItemValues,
[out] DWORD * pTransactionID,
[out, size_is(,dwCount)] HRESULT ** ppErrors
);
HRESULT Refresh(
[in] DWORD dwConnection,
[in] OPCDATASOURCE dwSource,
[out] DWORD * pTransactionID
);
HRESULT Cancel(
[in] DWORD dwTransactionID
);
}
//****************************************************
[
object,
uuid(39c13a54-011e-11d0-9675-0020afd8adb3),
pointer_default(unique)
]
interface IOPCItemMgt: IUnknown
{
HRESULT AddItems(
[in] DWORD dwCount,
[in, size_is(dwCount)] OPCITEMDEF * pItemArray,
[out, size_is(,dwCount)] OPCITEMRESULT ** ppAddResults,
[out, size_is(,dwCount)] HRESULT ** ppErrors
);
HRESULT ValidateItems(
[in] DWORD dwCount,
[in, size_is(dwCount)] OPCITEMDEF * pItemArray,
[in] BOOL bBlobUpdate,
[out, size_is(,dwCount)] OPCITEMRESULT ** ppValidationResults,
[out, size_is(,dwCount)] HRESULT ** ppErrors
);
HRESULT RemoveItems(
[in] DWORD dwCount,
[in, size_is(dwCount)] OPCHANDLE * phServer,
[out, size_is(,dwCount)] HRESULT ** ppErrors
);
HRESULT SetActiveState(
[in] DWORD dwCount,
[in, size_is(dwCount)] OPCHANDLE * phServer,
[in] BOOL bActive,
[out, size_is(,dwCount)] HRESULT ** ppErrors
);
HRESULT SetClientHandles(
[in] DWORD dwCount,
[in, size_is(dwCount)] OPCHANDLE * phServer,
[in, size_is(dwCount)] OPCHANDLE * phClient,
[out, size_is(,dwCount)] HRESULT ** ppErrors
);
HRESULT SetDatatypes(
[in] DWORD dwCount,
[in, size_is(dwCount)] OPCHANDLE * phServer,
[in, size_is(dwCount)] VARTYPE * pRequestedDatatypes,
[out, size_is(,dwCount)] HRESULT ** ppErrors
);
HRESULT CreateEnumerator(
[in] REFIID riid,
[out, iid_is(riid)] LPUNKNOWN * ppUnk
);
}
//****************************************************
[
object,
uuid(39c13a55-011e-11d0-9675-0020afd8adb3),
pointer_default(unique)
]
interface IEnumOPCItemAttributes : IUnknown
{
HRESULT Next(
[in] ULONG celt,
[out, size_is(,*pceltFetched)] OPCITEMATTRIBUTES ** ppItemArray,
[out] ULONG * pceltFetched
);
HRESULT Skip(
[in] ULONG celt
);
HRESULT Reset(
void
);
HRESULT Clone(
[out] IEnumOPCItemAttributes ** ppEnumItemAttributes
);
}
// Data Access V2.0 additions
[
object,
uuid(39c13a70-011e-11d0-9675-0020afd8adb3),
pointer_default(unique)
]
interface IOPCDataCallback : IUnknown
{
HRESULT OnDataChange(
[in] DWORD dwTransid,
[in] OPCHANDLE hGroup,
[in] HRESULT hrMasterquality,
[in] HRESULT hrMastererror,
[in] DWORD dwCount,
[in, size_is(dwCount)] OPCHANDLE * phClientItems,
[in, size_is(dwCount)] VARIANT * pvValues,
[in, size_is(dwCount)] WORD * pwQualities,
[in, size_is(dwCount)] FILETIME * pftTimeStamps,
[in, size_is(dwCount)] HRESULT * pErrors
);
HRESULT OnReadComplete(
[in] DWORD dwTransid,
[in] OPCHANDLE hGroup,
[in] HRESULT hrMasterquality,
[in] HRESULT hrMastererror,
[in] DWORD dwCount,
[in, size_is(dwCount)] OPCHANDLE * phClientItems,
[in, size_is(dwCount)] VARIANT * pvValues,
[in, size_is(dwCount)] WORD * pwQualities,
[in, size_is(dwCount)] FILETIME * pftTimeStamps,
[in, size_is(dwCount)] HRESULT * pErrors
);
HRESULT OnWriteComplete(
[in] DWORD dwTransid,
[in] OPCHANDLE hGroup,
[in] HRESULT hrMastererr,
[in] DWORD dwCount,
[in, size_is(dwCount)] OPCHANDLE * pClienthandles,
[in, size_is(dwCount)] HRESULT * pErrors
);
HRESULT OnCancelComplete(
[in] DWORD dwTransid,
[in] OPCHANDLE hGroup
);
}
//****************************************************
[
object,
uuid(39c13a71-011e-11d0-9675-0020afd8adb3),
pointer_default(unique)
]
interface IOPCAsyncIO2 : IUnknown
{
HRESULT Read(
[in] DWORD dwCount,
[in, size_is(dwCount)] OPCHANDLE * phServer,
[in] DWORD dwTransactionID,
[out] DWORD * pdwCancelID,
[out, size_is(,dwCount)] HRESULT ** ppErrors
);
HRESULT Write(
[in] DWORD dwCount,
[in, size_is(dwCount)] OPCHANDLE * phServer,
[in, size_is(dwCount)] VARIANT * pItemValues,
[in] DWORD dwTransactionID,
[out] DWORD * pdwCancelID,
[out, size_is(,dwCount)] HRESULT ** ppErrors
);
HRESULT Refresh2(
[in] OPCDATASOURCE dwSource,
[in] DWORD dwTransactionID,
[out] DWORD * pdwCancelID
);
HRESULT Cancel2(
[in] DWORD dwCancelID
);
HRESULT SetEnable(
[in] BOOL bEnable
);
HRESULT GetEnable(
[out] BOOL *pbEnable
);
}
//****************************************************
[
object,
uuid(39c13a72-011e-11d0-9675-0020afd8adb3),
pointer_default(unique)
]
interface IOPCItemProperties : IUnknown
{
HRESULT QueryAvailableProperties (
[in] LPWSTR szItemID,
[out] DWORD * pdwCount,
[out, size_is(,*pdwCount)] DWORD ** ppPropertyIDs,
[out, size_is(,*pdwCount)] LPWSTR ** ppDescriptions,
[out, size_is(,*pdwCount)] VARTYPE ** ppvtDataTypes
);
HRESULT GetItemProperties (
[in] LPWSTR szItemID,
[in] DWORD dwCount,
[in, size_is(dwCount)] DWORD * pdwPropertyIDs,
[out, size_is(,dwCount)] VARIANT ** ppvData,
[out, size_is(,dwCount)] HRESULT ** ppErrors
);
HRESULT LookupItemIDs(
[in] LPWSTR szItemID,
[in] DWORD dwCount,
[in, size_is(dwCount)] DWORD * pdwPropertyIDs,
[out, string, size_is(,dwCount)] LPWSTR ** ppszNewItemIDs,
[out, size_is(,dwCount)] HRESULT ** ppErrors
);
}
// This TYPELIB is generated as a convenience to users of high level tools
// which are capable of using or browsing TYPELIBs.
// 'Smart Pointers' in VC5 is one example.
[
uuid(B28EEDB2-AC6F-11d1-84D5-00608CB8A7E9),
version(1.0),
helpstring("OPCDA 2.0 Type Library")
]
library OPCDA
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
interface IOPCServer ;
interface IOPCServerPublicGroups ;
interface IOPCBrowseServerAddressSpace;
interface IOPCGroupStateMgt ;
interface IOPCPublicGroupStateMgt ;
interface IOPCSyncIO ;
interface IOPCAsyncIO ;
interface IOPCItemMgt;
interface IEnumOPCItemAttributes ;
interface IOPCDataCallback ;
interface IOPCAsyncIO2 ;
interface IOPCItemProperties ;
};
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -