mirror of https://github.com/mono/CppSharp.git
c-sharpdotnetmonobindingsbridgecclangcpluspluscppsharpglueinteropparserparsingpinvokeswigsyntax-treevisitorsxamarinxamarin-bindings
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.4 KiB
39 lines
1.4 KiB
// |
|
// Mono.VisualC.Interop.ABI.VTableCOM.cs: vtable implementation based on COM interop (reqiures mono patch) |
|
// |
|
// Author: |
|
// Alexander Corrado (alexander.corrado@gmail.com) |
|
// |
|
// Copyright (C) 2010 Alexander Corrado |
|
// |
|
|
|
using System; |
|
using System.Linq; |
|
using System.Collections.Generic; |
|
|
|
using System.Reflection; |
|
using System.Reflection.Emit; |
|
using System.Runtime.InteropServices; |
|
|
|
namespace Mono.VisualC.Interop.ABI { |
|
public class VTableCOM : VTable { |
|
|
|
public static MakeVTableDelegate Implementation = (entries) => { return new VTableCOM (entries); }; |
|
private VTableCOM (Delegate[] entries) : base(entries) |
|
{ |
|
int managedOverrides = (from entry in entries |
|
where entry != null |
|
select entry).Count(); |
|
|
|
vtPtr = Marshal.AllocHGlobal ((EntryCount + managedOverrides) * EntrySize); |
|
WriteOverrides (0); |
|
} |
|
|
|
public override MethodInfo PrepareVirtualCall (MethodInfo target, ILGenerator callsite, FieldInfo vtableField, |
|
LocalBuilder native, int vtableIndex) |
|
{ |
|
throw new System.NotImplementedException (); |
|
} |
|
|
|
} |
|
}
|
|
|