This section includes a quick reference for the methods on the Custom Interface. These interfaces, their parameters and behavior are defined in more detail later in the reference sections.

Custom Interface

Note: This section does not show additional standard COM Interfaces such as IUnknown, IEnumString and IEnumUnknown used by OPC Data Access.

OPCServer


IOPCServer

IOPCServerPublicGroups (optional)

IOPCBrowseServerAddressSpace (optional)

IOPCItemProperties (new 2.0)

IConnectionPointContainer (new 2.0)

IOPCCommon (new 2.0)

IPersistFile (optional)
 

OPCGroup


IOPCGroupStateMgt

IOPCPublicGroupStateMgt (optional)

IOPCASyncIO2 (new 2.0)

IOPCAsyncIO (obsolete - V1)

IOPCItemMgt

IConnectionPointContainer (new 2.0)

IOPCSyncIO

IDataObject (obsolete - V1)
 

EnumOPCItemAttributes


IEnumOPCItemAttributes
 
 
 

OPCServer Object


IOPCCommon
 
HRESULT SetLocaleID ( dwLcid )
HRESULT GetLocaleID ( pdwLcid )
HRESULT QueryAvailableLocaleIDs ( pdwCount, pdwLcid )
HRESULT GetErrorString ( dwError, ppString)
HRESULT SetClientName (szName)

IOPCServer
 
HRESULT AddGroup(szName, bActive, dwRequestedUpdateRate, hClientGroup, pTimeBias, pPercentDeadband, dwLCID, phServerGroup, pRevisedUpdateRate, riid, ppUnk)
HRESULT GetErrorString(dwError, dwLocale, ppString) 
HRESULT GetGroupByName(szName, riid, ppUnk)
HRESULT GetStatus(ppServerStatus)
HRESULT RemoveGroup(hServerGroup, bForce)
HRESULT CreateGroupEnumerator(dwScope, riid, ppUnk)

IConnectionPointContainer
 
HRESULT EnumConnectionPoints( IEnumConnectionPoints ppEnum);
HRESULT FindConnectionPoint( REFIID riid, IConnectionPoint ppCP);

IOPCItemProperties
 
HRESULT QueryAvailableProperties(szItemID, pdwCount, 
ppPropertyIDs, ppDescriptions, ppvtDataTypes );
HRESULT GetItemProperties (szItemID, dwCount, pdwPropertyIDs,
ppvData, ppErrors );
HRESULT LookupItemIDs( szItemID, dwCount, pdwPropertyIDs, 
ppszNewItemIDs, ppErrors );

 

IOPCBrowseServerAddressSpace (optional)
 
HRESULT QueryOrganization(pNameSpaceType );
HRESULT ChangeBrowsePosition(dwBrowseDirection, szString );
HRESULT BrowseOPCItemIDs( dwBrowseFilterType, szFilterCriteria, vtDataTypeFilter, dwAccessRightsFilter, ppIEnumString ); 
HRESULT GetItemID( szItemDataID, szItemID );
HRESULT BrowseAccessPaths( szItemID, ppIEnumString );

IOPCServerPublicGroups (optional)
 
HRESULT GetPublicGroupByName(szName, riid, ppUnk);
HRESULT RemovePublicGroup(hServerGroup, bForce);

IPersistFile (optional)
 
HRESULT IsDirty();
HRESULT Load(pszFileName, dwMode);
HRESULT Save(pszFileName, fRemember);
HRESULT SaveCompleted( pszFileName);
HRESULT GetCurFileName( ppszFileName);

 
 
 
 

OPCGroup Object

IOPCGroupStateMgt

 
HRESULT GetState(pUpdateRate, pActive, ppName, pTimeBias, pPercentDeadband, pLCID, phClientGroup, phServerGroup)
HRESULT SetState(pRequestedUpdateRate, pRevisedUpdateRate, pActive, pTimeBias, pPercentDeadband, pLCID, phClientGroup)
HRESULT SetName(szName);
HRESULT CloneGroup(szName, riid, ppUnk);

IOPCPublicGroupStateMgt (optional)

 
HRESULT GetState(pPublic);
HRESULT MoveToPublic(void);

IOPCSyncIO

 
HRESULT Read(dwSource, dwCount, phServer, ppItemValues, ppErrors)
HRESULT Write(dwCount, phServer, pItemValues, ppErrors)

IOPCAsyncIO2

 
HRESULT Read(dwCount, phServer, dwTransactionID, pdwCancelID, ppErrors,)
HRESULT Write(dwCount, phServer, pItemValues, dwTransactionID, pdwCancelID, ppErrors);
HRESULT Cancel2 (dwCancelID);
HRESULT Refresh2(dwSource, dwTransactionID, pdwCancelID);
HRESULT SetEnable(bEnable);
HRESULT GetEnable(pbEnable);

IOPCItemMgt

 
HRESULT AddItems(dwCount, pItemArray, ppAddResults, ppErrors)
HRESULT ValidateItems(dwCount, pItemArray, bBlobUpdate, ppValidationResults, ppErrors)
HRESULT RemoveItems(dwCount, phServer, ppErrors)
HRESULT SetActiveState(dwCount, phServer, bActive, ppErrors)
HRESULT SetClientHandles(dwCount, phServer, phClient, ppErrors)
HRESULT SetDatatypes(dwCount, phServer, pRequestedDatatypes, ppErrors)
HRESULT CreateEnumerator(riid, ppUnk) 

IConnectionPointContainer

 
HRESULT EnumConnectionPoints( IEnumConnectionPoints ppEnum);
HRESULT FindConnectionPoint( REFIID riid, IConnectionPoint ppCP);

 

IOPCAsyncIO (old)

 
HRESULT Read(dwConnection, dwSource, dwCount, phServer, pTransactionID, ppErrors,)
HRESULT Write(dwConnection, dwCount, phServer, pItemValues, pTransactionID, ppErrors);
HRESULT Cancel (dwTransactionID);
HRESULT Refresh(dwConnection, dwSource, pTransactionID);

IDataObject (old)

 
HRESULT Dadvise(pFmt, adv, pSnk, pConnection);
HRESULT Dunadvise(Connection);

Note: all other functions can be stubs which return E_NOTIMPL.

 

EnumOPCItemAttributes Object

IEnumOPCItemAttributes

 
HRESULT Next(celt, ppItemArray, pceltFetched);
HRESULT Skip(celt);
HRESULT Reset( void);
HRESULT Clone(ppEnumItemAttributes);

 
 
 
 

Custom Interface/Client Side

IOPCDataCallback

 
HRESULT OnReadComplete(dwTransid, hGroup, hrMasterquality, hrMastererror, dwCount, 
phClientItems, pvValues, pwQualities, pftTimeStamps, pErrors,);
HRESULT OnWriteComplete(dwTransid, hGroup, hrMastererr, dwCount, phClientItems, 
pErrors);
HRESULT OnCancelComplete(dwTransid, hGroup);
HRESULT OnDataChange(dwTransid, hGroup, hrMasterquality, hrMastererror, dwCount, 
phClientItems, pvValues, pwQualities, pftTimeStamps, pErrors,);

IOPCShutdown

 
void ShutdownRequest(szReason);

IAdviseSink (old)

 
void OnDataChange(pFE, pSTM);

Note: all other functions can be stubs which return E_NOTIMPL.