View Issue Details

IDProjectCategoryView StatusLast Update
0004705COM-DA Sample CodeImplementation Bugpublic2019-03-29 19:31
ReporterJiyang Hu Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status newResolutionopen 
PlatformWindowsOSWindowsOS Version10
Summary0004705: IOPCShutdown not implemented
Description
  1. In COpcDaServerWrapper.h COpcDaServerWrapper doesn't implement IOPCShutdown, then in COpcConnectionPoint.cpp OpcConnect() always returns E_FAIL for following code. IOPCShutdown should be added to class COpcDaServerWrapper implementation.

// connect
hResult = pCP->Advise(ipSink, pdwConnection);

    if (FAILED(hResult))
    {
        THROW();
    }
  1. In COpcConnectionPoint.cpp, COpcConnectionPoint::Advise() has following code,

if (pContainer != NULL)
{
pContainer->OnAdvise(m_tInterface, dwCookie);
pContainer->Release();
}

return S_OK;

When pContainer->OnAdvise(m_tInterface, dwCookie) fails in calling IOPCShutdown, Advise() shouldn't still return S_OK to client. In this case it should E_FAIL or another HResult instead of S_OK.

Steps To Reproduce
  1. Implement a IOPCShutdown callback in client side
  2. Shut down OPC Server in server side
  3. Following code in client should be invoked,

STDMETHODIMP ShutdownRequest(LPCWSTR szReason) { }

TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2019-03-29 19:31 Jiyang Hu New Issue