ScreenToGif.Webcam.DirectX.Filter.GetAnyMoniker C# (CSharp) Method

GetAnyMoniker() protected method

This method gets a UCOMIMoniker object. HACK: The only way to create a UCOMIMoniker from a moniker string is to use UCOMIMoniker.ParseDisplayName(). So I need ANY UCOMIMoniker object so that I can call ParseDisplayName(). Does anyone have a better solution? This assumes there is at least one video compressor filter installed on the system.
protected GetAnyMoniker ( ) : UCOMIMoniker
return UCOMIMoniker
        protected UCOMIMoniker GetAnyMoniker()
        {
            Guid category = Uuid.FilterCategory.VideoCompressorCategory;
            int hr;
            object comObj = null;
            ICreateDevEnum enumDev = null;
            UCOMIEnumMoniker enumMon = null;
            UCOMIMoniker[] mon = new UCOMIMoniker[1];

            try
            {
                // Get the system device enumerator
                Type srvType = Type.GetTypeFromCLSID(Uuid.Clsid.SystemDeviceEnum);
                if (srvType == null)
                    throw new NotImplementedException("System Device Enumerator");
                comObj = Activator.CreateInstance(srvType);
                enumDev = (ICreateDevEnum)comObj;

                //Create an enumerator to find filters in category
                hr = enumDev.CreateClassEnumerator(ref category, out enumMon, 0);
                if (hr != 0)
                    throw new NotSupportedException("No devices of the category");

                // Get first filter
                int f;
                hr = enumMon.Next(1, mon, out f);
                if ((hr != 0))
                    mon[0] = null;

                return (mon[0]);
            }
            finally
            {
                enumDev = null;
                if (enumMon != null)
                    Marshal.ReleaseComObject(enumMon); enumMon = null;
                if (comObj != null)
                    Marshal.ReleaseComObject(comObj); comObj = null;
            }
        }