Outlook Redemption - runtime binding on a null reference - Stack Overflow

admin2025-04-22  0

We have an implementation for getting outlook email information using RDO. We've tested this internally on several machines without problems. When running this on one of our customer machines we received the following error:

Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot perform runtime binding on a null reference
at CallSite.Target(Closure , CallSite , Object , Int32 )
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at ...<GetEntries>d__1.MoveNext()
private static IEnumerable<OutlookAddressEntry> GetEntries(RDOAddressList addressList)
{
    var table = addressList.AddressEntries.MAPITable;

    table.Columns = new[] { "Name", "SMTPAddress" };

    for (var i = 0; i < table.RowCount; i++)
    {
        dynamic row = table.GetRow();
        yield return new OutlookAddressEntry { Name = row[0], Email = row[1] };
    }
}

Please let me know if I've missed something in my implementation, whether I need to gather more information from the Customer's environment or if there are steps I can take towards understanding this problem.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745284890a294328.html

最新回复(0)