private static ComInterfaceEntry* InitializeComInterfaceEntry()
{
- GetIUnknownImpl(out IntPtr fpQueryInteface, out IntPtr fpAddRef, out IntPtr fpRelease);
+ GetIUnknownImpl(out IntPtr fpQueryInterface, out IntPtr fpAddRef, out IntPtr fpRelease);
- IntPtr iStreamVtbl = IStreamVtbl.Create(fpQueryInteface, fpAddRef, fpRelease);
+ IntPtr iStreamVtbl = IStreamVtbl.Create(fpQueryInterface, fpAddRef, fpRelease);
ComInterfaceEntry* wrapperEntry = (ComInterfaceEntry*)RuntimeHelpers.AllocateTypeAssociatedMemory(typeof(DrawingComWrappers), sizeof(ComInterfaceEntry));
wrapperEntry->IID = IID_IStream;
internal static class IStreamVtbl
{
- public static IntPtr Create(IntPtr fpQueryInteface, IntPtr fpAddRef, IntPtr fpRelease)
+ public static IntPtr Create(IntPtr fpQueryInterface, IntPtr fpAddRef, IntPtr fpRelease)
{
IntPtr* vtblRaw = (IntPtr*)RuntimeHelpers.AllocateTypeAssociatedMemory(typeof(IStreamVtbl), IntPtr.Size * 14);
- vtblRaw[0] = fpQueryInteface;
+ vtblRaw[0] = fpQueryInterface;
vtblRaw[1] = fpAddRef;
vtblRaw[2] = fpRelease;
vtblRaw[3] = (IntPtr)(delegate* unmanaged<IntPtr, byte*, uint, uint*, int>)&Read;
{
protected unsafe override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count)
{
- IntPtr fpQueryInteface = default;
+ IntPtr fpQueryInterface = default;
IntPtr fpAddRef = default;
IntPtr fpRelease = default;
- ComWrappers.GetIUnknownImpl(out fpQueryInteface, out fpAddRef, out fpRelease);
+ ComWrappers.GetIUnknownImpl(out fpQueryInterface, out fpAddRef, out fpRelease);
ComInterfaceEntry* entryRaw = null;
count = 0;
{
IUnknownImpl = new IUnknownVtbl()
{
- QueryInterface = fpQueryInteface,
+ QueryInterface = fpQueryInterface,
AddRef = fpAddRef,
Release = fpRelease
},
{
Console.WriteLine($"Running {nameof(ValidateIUnknownImpls)}...");
- ComWrappers.GetIUnknownImpl(out IntPtr fpQueryInteface, out IntPtr fpAddRef, out IntPtr fpRelease);
+ ComWrappers.GetIUnknownImpl(out IntPtr fpQueryInterface, out IntPtr fpAddRef, out IntPtr fpRelease);
- Assert.AreNotEqual(fpQueryInteface, IntPtr.Zero);
+ Assert.AreNotEqual(fpQueryInterface, IntPtr.Zero);
Assert.AreNotEqual(fpAddRef, IntPtr.Zero);
Assert.AreNotEqual(fpRelease, IntPtr.Zero);
}
static void ValidateWrappersInstanceIsolation()
{
- Console.WriteLine($"Running {nameof(ValidateWrappersInstanceIsolation)}...");
+ Console.WriteLine($"Running {nameof(ValidateWrappersInstanceIsolation)}...");
var cw1 = new TestComWrappers();
var cw2 = new TestComWrappers();
}
else if (string.Equals(ManagedServerTypeName, obj.GetType().Name))
{
- IntPtr fpQueryInteface = default;
+ IntPtr fpQueryInterface = default;
IntPtr fpAddRef = default;
IntPtr fpRelease = default;
- ComWrappers.GetIUnknownImpl(out fpQueryInteface, out fpAddRef, out fpRelease);
+ ComWrappers.GetIUnknownImpl(out fpQueryInterface, out fpAddRef, out fpRelease);
var vtbl = new IUnknownVtbl()
{
- QueryInterface = fpQueryInteface,
+ QueryInterface = fpQueryInterface,
AddRef = fpAddRef,
Release = fpRelease
};
private unsafe ComInterfaceEntry* ComputeVtablesForTestObject(Test obj, out int count)
{
- IntPtr fpQueryInteface = default;
+ IntPtr fpQueryInterface = default;
IntPtr fpAddRef = default;
IntPtr fpRelease = default;
- ComWrappers.GetIUnknownImpl(out fpQueryInteface, out fpAddRef, out fpRelease);
+ ComWrappers.GetIUnknownImpl(out fpQueryInterface, out fpAddRef, out fpRelease);
var iUnknownVtbl = new IUnknownVtbl()
{
- QueryInterface = fpQueryInteface,
+ QueryInterface = fpQueryInterface,
AddRef = fpAddRef,
Release = fpRelease
};