Error codes returned by IOPCHDA_SyncUpdate::InsertReplace|Classic OPC: DA, A&E, HDA, XML-DA, etc.|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Error codes returned by IOPCHDA_SyncUpdate::InsertReplace
Avatar
Zeljko Lazic
New Member
Members
Forum Posts: 2
Member Since:
06/20/2024
sp_UserOfflineSmall Offline
1
02/25/2025 - 14:24
sp_Permalink sp_Print

Hello,

I have a legacy c++ application that uses a WinTech dll to communicate with a PI OPC HDA server. I happen to have the WinTech code and I can see that the insert functionality just wraps the following opc com function

virtual HRESULT STDMETHODCALLTYPE InsertReplace(
/* [in] */ DWORD dwNumItems,
/* [size_is][in] */ OPCHANDLE __RPC_FAR *phServer,
/* [size_is][in] */ FILETIME __RPC_FAR *ftTimeStamps,
/* [size_is][in] */ VARIANT __RPC_FAR *vDataValues,
/* [size_is][in] */ DWORD __RPC_FAR *pdwQualities,
/* [size_is][out] */ HRESULT __RPC_FAR *__RPC_FAR *ppErrors) = 0;

 

In certain instances when inserting multple values, InsertReplace returns S_FALSE.

When I look at the contents of ppErrors, I’m seeing that most of the values are set to S_OK, but for one of the points the ppErrors vector contained the value: 0x509A6B0

But the value at the point was successfully written to the PI database.

Another tag contained the following values in the ppErrors array:

0x80004005
0x4FFB0C0

I tried using IOPCCommon : public IUnknown

virtual HRESULT STDMETHODCALLTYPE GetErrorString(
/* [in] */ HRESULT dwError,
/* [string][out] */ LPWSTR __RPC_FAR *ppString) = 0;

but the string return was unknown error

Does anyone know what these error codes are? TIA

Avatar
Randy Armstrong
Admin
Forum Posts: 1601
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
02/28/2025 - 10:48
sp_Permalink sp_Print

0x509A6B0 is not a error code.

Looks like random memory.

May be a bug in the server.

Avatar
Zeljko Lazic
New Member
Members
Forum Posts: 2
Member Since:
06/20/2024
sp_UserOfflineSmall Offline
3
02/28/2025 - 12:40
sp_Permalink sp_Print

do these look like random memory as well?

0x80004005
0x4FFB0C0

Avatar
Randy Armstrong
Admin
Forum Posts: 1601
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
4
03/07/2025 - 00:32
sp_Permalink sp_Print

0x80004005 E_FAIL is a generic code that does not provide much insight.

0x4FFB0C0 looks like random memory.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 19
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1464
Posts: 4951