mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
com interface impl IUnknown
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Snap.Hutao.Win32.Foundation;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Snap.Hutao.Win32.System.Com;
|
||||
|
||||
@@ -15,6 +12,28 @@ internal unsafe struct IBindCtx
|
||||
|
||||
private Vftbl* thisPtr;
|
||||
|
||||
public unsafe HRESULT QueryInterface<TInterface>(ref readonly Guid riid, out TInterface* pvObject)
|
||||
where TInterface : unmanaged
|
||||
{
|
||||
fixed (Guid* riid2 = &riid)
|
||||
{
|
||||
fixed (TInterface** ppvObject = &pvObject)
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.QueryInterface((IUnknown*)Unsafe.AsPointer(ref this), riid2, (void**)ppvObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public uint AddRef()
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.AddRef((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
public uint Release()
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.Release((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
internal readonly struct Vftbl
|
||||
{
|
||||
internal readonly IUnknown.Vftbl IUnknownVftbl;
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Snap.Hutao.Win32.Foundation;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Snap.Hutao.Win32.System.Com;
|
||||
|
||||
@@ -15,6 +12,28 @@ internal unsafe struct IEnumMoniker
|
||||
|
||||
private Vftbl* thisPtr;
|
||||
|
||||
public unsafe HRESULT QueryInterface<TInterface>(ref readonly Guid riid, out TInterface* pvObject)
|
||||
where TInterface : unmanaged
|
||||
{
|
||||
fixed (Guid* riid2 = &riid)
|
||||
{
|
||||
fixed (TInterface** ppvObject = &pvObject)
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.QueryInterface((IUnknown*)Unsafe.AsPointer(ref this), riid2, (void**)ppvObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public uint AddRef()
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.AddRef((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
public uint Release()
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.Release((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
internal readonly struct Vftbl
|
||||
{
|
||||
internal readonly IUnknown.Vftbl IUnknownVftbl;
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Snap.Hutao.Win32.Foundation;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Snap.Hutao.Win32.System.Com;
|
||||
|
||||
@@ -15,6 +12,28 @@ internal unsafe struct IEnumString
|
||||
|
||||
private Vftbl* thisPtr;
|
||||
|
||||
public unsafe HRESULT QueryInterface<TInterface>(ref readonly Guid riid, out TInterface* pvObject)
|
||||
where TInterface : unmanaged
|
||||
{
|
||||
fixed (Guid* riid2 = &riid)
|
||||
{
|
||||
fixed (TInterface** ppvObject = &pvObject)
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.QueryInterface((IUnknown*)Unsafe.AsPointer(ref this), riid2, (void**)ppvObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public uint AddRef()
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.AddRef((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
public uint Release()
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.Release((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
internal readonly struct Vftbl
|
||||
{
|
||||
internal readonly IUnknown.Vftbl IUnknownVftbl;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Snap.Hutao.Win32.Foundation;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Snap.Hutao.Win32.System.Com;
|
||||
|
||||
@@ -11,6 +12,28 @@ internal unsafe struct IMoniker
|
||||
|
||||
private Vftbl* thisPtr;
|
||||
|
||||
public unsafe HRESULT QueryInterface<TInterface>(ref readonly Guid riid, out TInterface* pvObject)
|
||||
where TInterface : unmanaged
|
||||
{
|
||||
fixed (Guid* riid2 = &riid)
|
||||
{
|
||||
fixed (TInterface** ppvObject = &pvObject)
|
||||
{
|
||||
return thisPtr->IPersistStreamVftbl.IPersistVftbl.IUnknownVftbl.QueryInterface((IUnknown*)Unsafe.AsPointer(ref this), riid2, (void**)ppvObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public uint AddRef()
|
||||
{
|
||||
return thisPtr->IPersistStreamVftbl.IPersistVftbl.IUnknownVftbl.AddRef((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
public uint Release()
|
||||
{
|
||||
return thisPtr->IPersistStreamVftbl.IPersistVftbl.IUnknownVftbl.Release((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
internal readonly struct Vftbl
|
||||
{
|
||||
internal readonly IPersistStream.Vftbl IPersistStreamVftbl;
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Snap.Hutao.Win32.Foundation;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Snap.Hutao.Win32.System.Com;
|
||||
|
||||
@@ -15,6 +12,28 @@ internal unsafe struct IPersist
|
||||
|
||||
private Vftbl* thisPtr;
|
||||
|
||||
public unsafe HRESULT QueryInterface<TInterface>(ref readonly Guid riid, out TInterface* pvObject)
|
||||
where TInterface : unmanaged
|
||||
{
|
||||
fixed (Guid* riid2 = &riid)
|
||||
{
|
||||
fixed (TInterface** ppvObject = &pvObject)
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.QueryInterface((IUnknown*)Unsafe.AsPointer(ref this), riid2, (void**)ppvObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public uint AddRef()
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.AddRef((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
public uint Release()
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.Release((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
internal unsafe readonly struct Vftbl
|
||||
{
|
||||
internal readonly IUnknown.Vftbl IUnknownVftbl;
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Snap.Hutao.Win32.Foundation;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Snap.Hutao.Win32.System.Com;
|
||||
|
||||
@@ -15,6 +12,28 @@ internal unsafe struct IPersistStream
|
||||
|
||||
private Vftbl* thisPtr;
|
||||
|
||||
public unsafe HRESULT QueryInterface<TInterface>(ref readonly Guid riid, out TInterface* pvObject)
|
||||
where TInterface : unmanaged
|
||||
{
|
||||
fixed (Guid* riid2 = &riid)
|
||||
{
|
||||
fixed (TInterface** ppvObject = &pvObject)
|
||||
{
|
||||
return thisPtr->IPersistVftbl.IUnknownVftbl.QueryInterface((IUnknown*)Unsafe.AsPointer(ref this), riid2, (void**)ppvObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public uint AddRef()
|
||||
{
|
||||
return thisPtr->IPersistVftbl.IUnknownVftbl.AddRef((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
public uint Release()
|
||||
{
|
||||
return thisPtr->IPersistVftbl.IUnknownVftbl.Release((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
internal readonly struct Vftbl
|
||||
{
|
||||
internal readonly IPersist.Vftbl IPersistVftbl;
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Snap.Hutao.Win32.Foundation;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Snap.Hutao.Win32.System.Com;
|
||||
|
||||
@@ -15,6 +12,28 @@ internal unsafe struct IRunningObjectTable
|
||||
|
||||
private Vftbl* thisPtr;
|
||||
|
||||
public unsafe HRESULT QueryInterface<TInterface>(ref readonly Guid riid, out TInterface* pvObject)
|
||||
where TInterface : unmanaged
|
||||
{
|
||||
fixed (Guid* riid2 = &riid)
|
||||
{
|
||||
fixed (TInterface** ppvObject = &pvObject)
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.QueryInterface((IUnknown*)Unsafe.AsPointer(ref this), riid2, (void**)ppvObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public uint AddRef()
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.AddRef((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
public uint Release()
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.Release((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
internal readonly struct Vftbl
|
||||
{
|
||||
internal readonly IUnknown.Vftbl IUnknownVftbl;
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Snap.Hutao.Win32.Foundation;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Snap.Hutao.Win32.System.Com;
|
||||
|
||||
@@ -15,6 +12,28 @@ internal unsafe struct ISequentialStream
|
||||
|
||||
private Vftbl* thisPtr;
|
||||
|
||||
public unsafe HRESULT QueryInterface<TInterface>(ref readonly Guid riid, out TInterface* pvObject)
|
||||
where TInterface : unmanaged
|
||||
{
|
||||
fixed (Guid* riid2 = &riid)
|
||||
{
|
||||
fixed (TInterface** ppvObject = &pvObject)
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.QueryInterface((IUnknown*)Unsafe.AsPointer(ref this), riid2, (void**)ppvObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public uint AddRef()
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.AddRef((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
public uint Release()
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.Release((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
internal readonly struct Vftbl
|
||||
{
|
||||
internal readonly IUnknown.Vftbl IUnknownVftbl;
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Snap.Hutao.Win32.Foundation;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Snap.Hutao.Win32.System.Com;
|
||||
|
||||
@@ -15,6 +12,28 @@ internal unsafe struct IStream
|
||||
|
||||
private Vftbl* thisPtr;
|
||||
|
||||
public unsafe HRESULT QueryInterface<TInterface>(ref readonly Guid riid, out TInterface* pvObject)
|
||||
where TInterface : unmanaged
|
||||
{
|
||||
fixed (Guid* riid2 = &riid)
|
||||
{
|
||||
fixed (TInterface** ppvObject = &pvObject)
|
||||
{
|
||||
return thisPtr->ISequentialStreamVftbl.IUnknownVftbl.QueryInterface((IUnknown*)Unsafe.AsPointer(ref this), riid2, (void**)ppvObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public uint AddRef()
|
||||
{
|
||||
return thisPtr->ISequentialStreamVftbl.IUnknownVftbl.AddRef((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
public uint Release()
|
||||
{
|
||||
return thisPtr->ISequentialStreamVftbl.IUnknownVftbl.Release((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
internal readonly struct Vftbl
|
||||
{
|
||||
internal readonly ISequentialStream.Vftbl ISequentialStreamVftbl;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
using Snap.Hutao.Win32.Foundation;
|
||||
using Snap.Hutao.Win32.System.Com;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Snap.Hutao.Win32.UI.Shell;
|
||||
|
||||
@@ -12,6 +13,28 @@ internal unsafe struct IFileDialogEvents
|
||||
|
||||
private Vftbl* thisPtr;
|
||||
|
||||
public unsafe HRESULT QueryInterface<TInterface>(ref readonly Guid riid, out TInterface* pvObject)
|
||||
where TInterface : unmanaged
|
||||
{
|
||||
fixed (Guid* riid2 = &riid)
|
||||
{
|
||||
fixed (TInterface** ppvObject = &pvObject)
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.QueryInterface((IUnknown*)Unsafe.AsPointer(ref this), riid2, (void**)ppvObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public uint AddRef()
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.AddRef((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
public uint Release()
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.Release((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
internal readonly struct Vftbl
|
||||
{
|
||||
internal readonly IUnknown.Vftbl IUnknownVftbl;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
using Snap.Hutao.Win32.Foundation;
|
||||
using Snap.Hutao.Win32.System.Com;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace Snap.Hutao.Win32.UI.Shell;
|
||||
@@ -14,6 +15,28 @@ internal unsafe struct IModalWindow
|
||||
|
||||
private readonly Vftbl* thisPtr;
|
||||
|
||||
public unsafe HRESULT QueryInterface<TInterface>(ref readonly Guid riid, out TInterface* pvObject)
|
||||
where TInterface : unmanaged
|
||||
{
|
||||
fixed (Guid* riid2 = &riid)
|
||||
{
|
||||
fixed (TInterface** ppvObject = &pvObject)
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.QueryInterface((IUnknown*)Unsafe.AsPointer(ref this), riid2, (void**)ppvObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public uint AddRef()
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.AddRef((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
public uint Release()
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.Release((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
internal unsafe readonly struct Vftbl
|
||||
{
|
||||
internal readonly IUnknown.Vftbl IUnknownVftbl;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
using Snap.Hutao.Win32.Foundation;
|
||||
using Snap.Hutao.Win32.System.Com;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace Snap.Hutao.Win32.UI.Shell;
|
||||
@@ -14,6 +15,28 @@ internal unsafe struct IShellItemFilter
|
||||
|
||||
private Vftbl* thisPtr;
|
||||
|
||||
public unsafe HRESULT QueryInterface<TInterface>(ref readonly Guid riid, out TInterface* pvObject)
|
||||
where TInterface : unmanaged
|
||||
{
|
||||
fixed (Guid* riid2 = &riid)
|
||||
{
|
||||
fixed (TInterface** ppvObject = &pvObject)
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.QueryInterface((IUnknown*)Unsafe.AsPointer(ref this), riid2, (void**)ppvObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public uint AddRef()
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.AddRef((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
public uint Release()
|
||||
{
|
||||
return thisPtr->IUnknownVftbl.Release((IUnknown*)Unsafe.AsPointer(ref this));
|
||||
}
|
||||
|
||||
internal readonly struct Vftbl
|
||||
{
|
||||
internal readonly IUnknown.Vftbl IUnknownVftbl;
|
||||
|
||||
Reference in New Issue
Block a user