Пример #1
0
        internal Collection <string> MethodDefinitions()
        {
            Collection <string> collection = new Collection <string>();

            foreach (int method in this.methods)
            {
                IntPtr ppFuncDesc;
                this.typeInfo.GetFuncDesc(method, out ppFuncDesc);
                string signatureFromFuncDesc = ComUtil.GetMethodSignatureFromFuncDesc(this.typeInfo, (System.Runtime.InteropServices.ComTypes.FUNCDESC)Marshal.PtrToStructure(ppFuncDesc, typeof(System.Runtime.InteropServices.ComTypes.FUNCDESC)), false);
                collection.Add(signatureFromFuncDesc);
                this.typeInfo.ReleaseFuncDesc(ppFuncDesc);
            }
            return(collection);
        }
Пример #2
0
        internal Collection <string> MethodDefinitions()
        {
            Collection <string> collection = new Collection <string>();

            foreach (int num in this.methods)
            {
                IntPtr ptr;
                this.typeInfo.GetFuncDesc(num, out ptr);
                System.Runtime.InteropServices.ComTypes.FUNCDESC funcdesc = (System.Runtime.InteropServices.ComTypes.FUNCDESC)Marshal.PtrToStructure(ptr, typeof(System.Runtime.InteropServices.ComTypes.FUNCDESC));
                string item = ComUtil.GetMethodSignatureFromFuncDesc(this.typeInfo, funcdesc, false);
                collection.Add(item);
                this.typeInfo.ReleaseFuncDesc(ptr);
            }
            return(collection);
        }
Пример #3
0
        internal string GetDefinition()
        {
            IntPtr ppFuncDesc = IntPtr.Zero;

            try
            {
                this.typeInfo.GetFuncDesc(this.GetFuncDescIndex(), out ppFuncDesc);
                return(ComUtil.GetMethodSignatureFromFuncDesc(this.typeInfo, (System.Runtime.InteropServices.ComTypes.FUNCDESC)Marshal.PtrToStructure(ppFuncDesc, typeof(System.Runtime.InteropServices.ComTypes.FUNCDESC)), !this.hasGetter));
            }
            finally
            {
                if (ppFuncDesc != IntPtr.Zero)
                {
                    this.typeInfo.ReleaseFuncDesc(ppFuncDesc);
                }
            }
        }
Пример #4
0
        internal string GetDefinition()
        {
            IntPtr pFuncDesc = IntPtr.Zero;

            try
            {
                _typeInfo.GetFuncDesc(GetFuncDescIndex(), out pFuncDesc);
                COM.FUNCDESC funcdesc = Marshal.PtrToStructure <COM.FUNCDESC>(pFuncDesc);

                return(ComUtil.GetMethodSignatureFromFuncDesc(_typeInfo, funcdesc, !IsGettable));
            }
            finally
            {
                if (pFuncDesc != IntPtr.Zero)
                {
                    _typeInfo.ReleaseFuncDesc(pFuncDesc);
                }
            }
        }
Пример #5
0
        /// <summary>
        /// Returns the different method overloads signatures.
        /// </summary>
        /// <returns></returns>
        internal Collection <string> MethodDefinitions()
        {
            Collection <string> result = new Collection <string>();

            foreach (int index in _methods)
            {
                IntPtr pFuncDesc;

                _typeInfo.GetFuncDesc(index, out pFuncDesc);
                COM.FUNCDESC funcdesc = Marshal.PtrToStructure <COM.FUNCDESC>(pFuncDesc);

                string signature = ComUtil.GetMethodSignatureFromFuncDesc(_typeInfo, funcdesc, false);
                result.Add(signature);

                _typeInfo.ReleaseFuncDesc(pFuncDesc);
            }

            return(result);
        }
Пример #6
0
        internal string GetDefinition()
        {
            string str;
            IntPtr zero = IntPtr.Zero;

            try
            {
                this.typeInfo.GetFuncDesc(this.GetFuncDescIndex(), out zero);
                System.Runtime.InteropServices.ComTypes.FUNCDESC funcdesc = (System.Runtime.InteropServices.ComTypes.FUNCDESC)Marshal.PtrToStructure(zero, typeof(System.Runtime.InteropServices.ComTypes.FUNCDESC));
                str = ComUtil.GetMethodSignatureFromFuncDesc(this.typeInfo, funcdesc, !this.hasGetter);
            }
            finally
            {
                if (zero != IntPtr.Zero)
                {
                    this.typeInfo.ReleaseFuncDesc(zero);
                }
            }
            return(str);
        }