Beispiel #1
0
            private unsafe Guid GetPropertyPage(Ole32.DispatchID dispid)
            {
                try
                {
                    Oleaut32.IPerPropertyBrowsing ippb = _owner.GetPerPropertyBrowsing();
                    if (ippb is null)
                    {
                        return(Guid.Empty);
                    }

                    Guid rval = Guid.Empty;
                    if (ippb.MapPropertyToPage(dispid, &rval).Succeeded())
                    {
                        return(rval);
                    }
                }
                catch (COMException)
                {
                }
                catch (Exception t)
                {
                    Debug.Fail(t.ToString());
                }
                return(Guid.Empty);
            }
Beispiel #2
0
        private unsafe Guid GetPropertyPageGuid(Oleaut32.IPerPropertyBrowsing target, Ole32.DispatchID dispid)
        {
            // check for a property page
            Guid    guid = Guid.Empty;
            HRESULT hr   = target.MapPropertyToPage(dispid, &guid);

            if (hr == HRESULT.S_OK)
            {
                return(guid);
            }

            return(Guid.Empty);
        }