Following simple code complain about an access violation when executed in a background thread. It works fine if executed in an UI thread. Any one know how to fix this?
UccOperationContext context = new UccOperationContextClass();
context.Initialize(1, null);
context.Context.AddProperty(1, session.GetHashCode());
Or
UccOperationContext oc = new UccOperationContext();
UccContext c = new UccContextClass();
c.AddNamedProperty(key, value);
oc.Initialize(1, c);