当前位置: 首页>>代码示例>>C#>>正文


C# ITypeInfo.GetFuncDesc方法代码示例

本文整理汇总了C#中ITypeInfo.GetFuncDesc方法的典型用法代码示例。如果您正苦于以下问题:C# ITypeInfo.GetFuncDesc方法的具体用法?C# ITypeInfo.GetFuncDesc怎么用?C# ITypeInfo.GetFuncDesc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ITypeInfo的用法示例。


在下文中一共展示了ITypeInfo.GetFuncDesc方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetFuncDesc

 public IntPtr GetFuncDesc(ITypeInfo typeInfo, int index)
 {
     if (typeInfo == null) throw new ArgumentNullException(nameof(typeInfo));
     IntPtr ret;
     typeInfo.GetFuncDesc(index, out ret);
     return ret;
 }
开发者ID:dbremner,项目名称:clrinterop,代码行数:7,代码来源:DefaultDaemon.cs

示例2: GetFuncDescForDescIndex

 internal static void GetFuncDescForDescIndex(ITypeInfo typeInfo, int funcIndex, out System.Runtime.InteropServices.ComTypes.FUNCDESC funcDesc, out IntPtr funcDescHandle)
 {
     IntPtr zero = IntPtr.Zero;
     typeInfo.GetFuncDesc(funcIndex, out zero);
     if (zero == IntPtr.Zero)
     {
         throw new COMException(Microsoft.Build.Shared.ResourceUtilities.FormatResourceString("ResolveComReference.CannotRetrieveTypeInformation", new object[0]));
     }
     funcDesc = (System.Runtime.InteropServices.ComTypes.FUNCDESC) Marshal.PtrToStructure(zero, typeof(System.Runtime.InteropServices.ComTypes.FUNCDESC));
     funcDescHandle = zero;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:11,代码来源:ComReference.cs

示例3: GetMethodInformationArray

 internal static ComMethodInformation[] GetMethodInformationArray(ITypeInfo typeInfo, Collection<int> methods, bool skipLastParameters)
 {
     int count = methods.Count;
     int num2 = 0;
     ComMethodInformation[] informationArray = new ComMethodInformation[count];
     foreach (int num3 in methods)
     {
         IntPtr ptr;
         typeInfo.GetFuncDesc(num3, out ptr);
         System.Runtime.InteropServices.ComTypes.FUNCDESC funcdesc = (System.Runtime.InteropServices.ComTypes.FUNCDESC) Marshal.PtrToStructure(ptr, typeof(System.Runtime.InteropServices.ComTypes.FUNCDESC));
         informationArray[num2++] = GetMethodInformation(funcdesc, skipLastParameters);
         typeInfo.ReleaseFuncDesc(ptr);
     }
     return informationArray;
 }
开发者ID:nickchal,项目名称:pash,代码行数:15,代码来源:ComUtil.cs

示例4: GetFuncDescForDescIndex

        /// <summary>
        /// Helper method for retrieving the function description structure for the given function index.
        /// This method needs to also return the native pointer to be released when we're done with our FUNCDESC.
        /// It's not really possible to copy everything to a managed struct and then release the ptr immediately
        /// here, since FUNCDESCs contain other native pointers we may need to access.
        /// </summary>
        /// <param name="typeInfo"></param>
        /// <param name="funcIndex"></param>
        /// <param name="funcDesc"></param>
        /// <param name="funcDescHandle"></param>
        /// <returns></returns>
        internal static void GetFuncDescForDescIndex(ITypeInfo typeInfo, int funcIndex, out FUNCDESC funcDesc, out IntPtr funcDescHandle)
        {
            IntPtr pFuncDesc = IntPtr.Zero;
            typeInfo.GetFuncDesc(funcIndex, out pFuncDesc);

            // GetFuncDesc should never return null, this is just to be safe
            if (pFuncDesc == IntPtr.Zero)
            {
                throw new COMException(
                    ResourceUtilities.FormatResourceString("ResolveComReference.CannotRetrieveTypeInformation"));
            }

            funcDesc = (FUNCDESC)Marshal.PtrToStructure(pFuncDesc, typeof(FUNCDESC));
            funcDescHandle = pFuncDesc;
        }
开发者ID:cameron314,项目名称:msbuild,代码行数:26,代码来源:ComReference.cs

示例5: GetFuncDesc_Proxy

 private static IntPtr GetFuncDesc_Proxy(ITypeInfo typeInfo, int index)
 {
     IntPtr funcDesc;
     typeInfo.GetFuncDesc(index, out funcDesc);
     return funcDesc;
 }
开发者ID:dbremner,项目名称:clrinterop,代码行数:6,代码来源:FormDaemon.cs

示例6: GetFuncDesc

 internal static System.Runtime.InteropServices.ComTypes.FUNCDESC GetFuncDesc(ITypeInfo typeinfo, int index)
 {
     IntPtr ptr;
     typeinfo.GetFuncDesc(index, out ptr);
     System.Runtime.InteropServices.ComTypes.FUNCDESC funcdesc = (System.Runtime.InteropServices.ComTypes.FUNCDESC) Marshal.PtrToStructure(ptr, typeof(System.Runtime.InteropServices.ComTypes.FUNCDESC));
     typeinfo.ReleaseFuncDesc(ptr);
     return funcdesc;
 }
开发者ID:nickchal,项目名称:pash,代码行数:8,代码来源:ComTypeInfo.cs


注:本文中的ITypeInfo.GetFuncDesc方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。