internal static bool IsOSCException(Exception ex)
        {
            bool isOSCException = false;

            if (ex is OSCException)
            {
                OSCException cex = ex as OSCException;
                switch (System.Runtime.InteropServices.Marshal.GetHRForException(cex))
                {
                case (int)OSCExceptions.OSC_E_AUTH_ERROR:
                case (int)OSCExceptions.OSC_E_COULDNOTCONNECT:
                case (int)OSCExceptions.OSC_E_INTERNAL_ERROR:
                case (int)OSCExceptions.OSC_E_INVALIDARG:
                case (int)OSCExceptions.OSC_E_NO_CHANGES:
                case (int)OSCExceptions.OSC_E_NOT_FOUND:
                case (int)OSCExceptions.OSC_E_NOT_IMPLEMENTED:
                case (int)OSCExceptions.OSC_E_OUT_OF_MEMORY:
                case (int)OSCExceptions.OSC_E_PERMISSION_DENIED:
                case (int)OSCExceptions.OSC_E_VERSION:
                    isOSCException = true;
                    break;

                default:
                    isOSCException = false;
                    break;
                }
            }
            return(isOSCException);
        }
        public string GetCapabilities()
        {
            EnsureProviderData();
            if (m_providerData == null || m_providerData.ProviderCapabilities == null)
            {
                OSCException oex = new OSCException(@"Capabilities not available. Be sure you are returning a value in GetProviderData.", OSCExceptions.OSC_E_NOT_FOUND);
                OnTraceEvent(this, new OSCEventArgs(TraceType.Exceptions, oex.Message, oex));
                throw oex;
            }

            return(m_providerData.ProviderCapabilities.Xml);
        }