This documentation is archived and is not being maintained.

IUccDiagnosticInfo Interface

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Encapsulates the diagnostic information as an entry in an error report.

Namespace: Microsoft.Office.Interop.UccApi
Assembly: Microsoft.Office.Interop.UccApi (in microsoft.office.interop.uccapi.dll)

public interface IUccDiagnosticInfo : IUnknown
public interface IUccDiagnosticInfo extends IUnknown
public interface IUccDiagnosticInfo extends IUnknown

The UCC API supports error reporting to the event log on an application's local computer or to the server. Each entry of the error report is also propagated to the application as an instance of this interface.

Win32 COM/C++ Syntax

interface IUccDiagnosticInfo : IUnknown

An instance of IUccDiagnosticInfo is obtained by reading the UCCOPEC_DIAGNOSTIC_DETAILS property of an instance of IUccContext.

The following example reads an IUccOperationProgressEvent instance obtained from the platform when the OnShutdown event is raised. You get an instance of IUccOperationContext from the OriginalOperationContext property of IUccOperationProgressEvent instance.

The example method accepts an IUccOperationContext instance obtained as previously described.

    public struct DiagnosicInfo
    {
        public int Code;
        public List<string> Properties;
        public string Source;
        public List<int> ErrorCodes;
        public string Text;
        public string DiagType;
    }
        public List<DiagnosicInfo> DiagnosticInformation(IUccOperationContext pContext)
        {
            List<DiagnosicInfo> returnValue = new List<DiagnosicInfo>();
            if (pContext.Context.IsPropertySet(
                (int)UCC_OPERATION_PROGRESS_EVENT_CONTEXT.UCCOPEC_DIAGNOSTIC_DETAILS))
            {
                IUccCollection diagCollection = pContext.Context.get_Property(
                    (int)UCC_OPERATION_PROGRESS_EVENT_CONTEXT.UCCOPEC_DIAGNOSTIC_DETAILS) as IUccCollection;
                foreach (IUccDiagnosticInfo d in diagCollection)
                {
                    DiagnosicInfo diagDetails = new DiagnosicInfo();
                    diagDetails.DiagType = d.Type.ToString();
                    diagDetails.Code = d.Code;
                    foreach (int code in d.SubCodes)
                    {
                        diagDetails.ErrorCodes.Add(code);
                    }
                    diagDetails.Source = d.Source;
                    diagDetails.Text = d.Text;

                    foreach (IUccProperty property in d.Properties)
                    {
                        diagDetails.Properties.Add(
                            property.Id.ToString() 
                            + " " 
                            + property.Value.ToString());
                    }
                    returnValue.Add(diagDetails);
                }
            }
            return returnValue;
        }

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2000 with Service Pack 4, Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

Show: