本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例5: GetFuncDesc_Proxy
private static IntPtr GetFuncDesc_Proxy(ITypeInfo typeInfo, int index)
{
IntPtr funcDesc;
typeInfo.GetFuncDesc(index, out funcDesc);
return funcDesc;
}
示例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;
}