Ejemplo n.º 1
0
        int OleInterop.IDataObject.EnumDAdvise(out OleInterop.IEnumSTATDATA ppenumAdvise)
        {
            if (null != oleData)
            {
                return(oleData.EnumDAdvise(out ppenumAdvise));
            }

            // Call the BCL version of the method
            BclComTypes.IEnumSTATDATA bclEnum;
            int hr = bclData.EnumDAdvise(out bclEnum);

            NativeMethods.ThrowOnFailure(hr);
            if (null == bclEnum)
            {
                ppenumAdvise = null;
            }
            else
            {
                ppenumAdvise = bclEnum as OleInterop.IEnumSTATDATA;
                if (null == ppenumAdvise)
                {
                    ppenumAdvise = (OleInterop.IEnumSTATDATA)(new EnumSTATDATA(bclEnum));
                }
            }
            return(hr);
        }
Ejemplo n.º 2
0
 internal EnumSTATDATA(BclComTypes.IEnumSTATDATA bclEnum)
 {
     if (null == bclEnum)
     {
         throw new ArgumentNullException("System.Runtime.InteropServices.ComTypes.IEnumSTATDATA");
     }
     this.oleEnum = bclEnum as OleInterop.IEnumSTATDATA;
     this.bclEnum = bclEnum;
 }
Ejemplo n.º 3
0
 internal EnumSTATDATA(OleInterop.IEnumSTATDATA oleEnum)
 {
     if (null == oleEnum)
     {
         throw new ArgumentNullException("Microsoft.VisualStudio.OLE.Interop.IEnumSTATDATA");
     }
     this.oleEnum = oleEnum;
     this.bclEnum = oleEnum as BclComTypes.IEnumSTATDATA;
 }
Ejemplo n.º 4
0
 //////////////////////////////////////////////////////////////
 // Clone
 void OleInterop.IEnumSTATDATA.Clone(out OleInterop.IEnumSTATDATA ppEnum)
 {
     ppEnum = null;
     if (null != oleEnum)
     {
         oleEnum.Clone(out ppEnum);
     }
     else
     {
         BclComTypes.IEnumSTATDATA bclCloned;
         bclEnum.Clone(out bclCloned);
         ppEnum = bclCloned as OleInterop.IEnumSTATDATA;
         if (null == ppEnum)
         {
             ppEnum = (OleInterop.IEnumSTATDATA)(new EnumSTATDATA(bclCloned));
         }
     }
 }
Ejemplo n.º 5
0
 internal EnumSTATDATA(BclComTypes.IEnumSTATDATA bclEnum)
 {
     if (null == bclEnum)
         throw new ArgumentNullException("System.Runtime.InteropServices.ComTypes.IEnumSTATDATA");
     this.oleEnum = bclEnum as OleInterop.IEnumSTATDATA;
     this.bclEnum = bclEnum;
 }
Ejemplo n.º 6
0
 internal EnumSTATDATA(OleInterop.IEnumSTATDATA oleEnum)
 {
     if (null == oleEnum)
         throw new ArgumentNullException("Microsoft.VisualStudio.OLE.Interop.IEnumSTATDATA");
     this.oleEnum = oleEnum;
     this.bclEnum = oleEnum as BclComTypes.IEnumSTATDATA;
 }