本文整理汇总了C#中ITypeInfo.ReleaseFuncDesc方法的典型用法代码示例。如果您正苦于以下问题:C# ITypeInfo.ReleaseFuncDesc方法的具体用法?C# ITypeInfo.ReleaseFuncDesc怎么用?C# ITypeInfo.ReleaseFuncDesc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITypeInfo
的用法示例。
在下文中一共展示了ITypeInfo.ReleaseFuncDesc方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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;
}
示例2: ReleaseFuncDesc
public void ReleaseFuncDesc(ITypeInfo typeInfo, IntPtr funcDesc)
{
if (typeInfo == null) throw new ArgumentNullException(nameof(typeInfo));
typeInfo.ReleaseFuncDesc(funcDesc);
}
示例3: ScanDefinedFunctions
private void ScanDefinedFunctions(ITypeInfo typeInfo, System.Runtime.InteropServices.ComTypes.TYPEATTR typeAttributes)
{
for (int i = 0; i < typeAttributes.cFuncs; i++)
{
IntPtr zero = IntPtr.Zero;
try
{
System.Runtime.InteropServices.ComTypes.FUNCDESC funcdesc;
ComReference.GetFuncDescForDescIndex(typeInfo, i, out funcdesc, out zero);
int num2 = 0;
for (int j = 0; j < funcdesc.cParams; j++)
{
System.Runtime.InteropServices.ComTypes.ELEMDESC elementDesc = (System.Runtime.InteropServices.ComTypes.ELEMDESC) Marshal.PtrToStructure(new IntPtr(funcdesc.lprgelemdescParam.ToInt64() + num2), typeof(System.Runtime.InteropServices.ComTypes.ELEMDESC));
this.AnalyzeElement(typeInfo, elementDesc);
num2 += Marshal.SizeOf(typeof(System.Runtime.InteropServices.ComTypes.ELEMDESC));
}
this.AnalyzeElement(typeInfo, funcdesc.elemdescFunc);
}
finally
{
if (zero != IntPtr.Zero)
{
typeInfo.ReleaseFuncDesc(zero);
}
}
}
}
示例4: ReleaseFuncDesc_Proxy
private static void ReleaseFuncDesc_Proxy(ITypeInfo typeInfo, IntPtr funcDesc)
{
typeInfo.ReleaseFuncDesc(funcDesc);
}
示例5: 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;
}