OPC write interface to the DeltaV Continuous Historian

GetItemHandles method (C++)

To retrieve server item handles for history tags created with the CreateTags method, use the standard GetItemHandles method for the IOPCHDA_Server interface. The server item handles can then be passed to the Insert method along with a time stamp, data value, and OPC quality value to write a history sample into the specified history tag. For additional information about the following syntax, refer to section 4.4.1.4 in OPC Historical Data Access Specification Version 1.20:

HRESULT GetItemHandles(
        [in] DWORD dwCount,
        [in, size_is(dwCount)] LPWSTR *pszItemID,
        [in, size_is(dwCount)] OPCHANDLE *phClient,
        [out, size_is(, dwCount)] OPCHANDLE **pphServer,
        [out, size_is(, dwCount)] HRESULT **ppErrors);
Parameter Description
dwCount The number of item handles being requested.
pszItemID A pointer to an array of history tag names.
phClient The handle of the client to be associated with the item.
pphServer The returned list of server item handles for each item.
ppErrors The status of association of the client to the server.
The GetItemHandles method converts any history tag name to uppercase before searching for its item handle in the OPC HDA server.