View Issue Details

IDProjectCategoryView StatusLast Update
0000360.NET APIApi Changepublic2008-07-09 05:45
ReporterBill Venhaus Assigned ToRandy Armstrong  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Summary0000360: AE Client faults on Refesh
Description

I had also posted this in the forum, here was my post. Thanks

...

Hi, when I try to perform a refresh with the sample AE client that is bundled with "OPC .NET API 2.00 Source Code.msi" I receive the following error.

E_FAIL
IOPCEventSubscriptionMgt.Refresh

I am connecting to a Cyberlogic AE server and have asked them about this and their response was that the problem lies in the file OpcCom.Ae.Subscription.cs

Code:

public void Refresh()
{
lock (this)
{
// verify state and arguments.
if (m_subscription == null) throw new NotConnectedException();

            // invoke COM method. 
            try 
            { 
                  ((IOPCEventSubscriptionMgt)m_subscription).Refresh(0); 
            } 
            catch (Exception e) 
            { 
                  throw 

OpcCom.Interop.CreateException("IOPCEventSubscriptionMgt.Refresh", e);
}
}
}

They went on to say...

Quote:

As you can see, the Refresh() function always uses 0 for the dwConnection parameter rather than the value returned from the Advise() function call (For example, in the debug run here the correct value should have been a 1 instead.). This is why we return E_FAIL.

How can I resolve this issue?

Thanks,
Bill

TagsNo tags attached.

Activities

Randy Armstrong

2008-06-02 21:37

administrator   ~0000716

Possible fix:

In OpcCom.ConnectionPoint.cs add this:
[code]/// <summary>
/// The cookie returned in the advise call.
/// </summary>
public int Cookie
{
get { return m_cookie; }
}[/code]

Change OpcCom.Ae.Subscription.cs to

[code]// invoke COM method.
try
{
((IOPCEventSubscriptionMgt)m_subscription).Refresh(m_connection.Cookie);
}
catch (Exception e)
{
throw OpcCom.Interop.CreateException("IOPCEventSubscriptionMgt.Refresh", e);
}[/code]

Randy Armstrong

2008-07-09 05:45

administrator   ~0000723

Fixed in Build 101

Issue History

Date Modified Username Field Change
2008-05-22 18:32 Bill Venhaus New Issue
2008-05-27 23:29 Randy Armstrong Status new => acknowledged
2008-06-02 21:37 Randy Armstrong Note Added: 0000716
2008-06-02 21:37 Randy Armstrong Assigned To => Randy Armstrong
2008-06-02 21:37 Randy Armstrong Status acknowledged => confirmed
2008-07-09 05:45 Randy Armstrong Status confirmed => resolved
2008-07-09 05:45 Randy Armstrong Resolution open => fixed
2008-07-09 05:45 Randy Armstrong Note Added: 0000723