Generates vtable function compatible with the COM and WinRT ABI in C# struct.
> dotnet add package 0x5BFA.VTableFunctionGenerator --prerelease
using Windows.Win32.Foundation;
namespace Windows.Win32.System.WinRT;
public unsafe partial struct IStorageProviderQuotaUI
{
[GeneratedVTableFunction(Index = 6)]
public partial HRESULT GetQuotaTotalInBytes(ulong* value);
[GeneratedVTableFunction(Index = 8)]
public partial HRESULT GetQuotaUsedInBytes(ulong* value);
}generates
// <auto-generated/>
#pragma warning disable
namespace Windows.Win32.System.WinRT;
public unsafe partial struct IStorageProviderQuotaUI
{
private void** lpVtbl;
[global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public partial global::Windows.Win32.Foundation.HRESULT GetQuotaTotalInBytes(ulong* value)
{
return (global::Windows.Win32.Foundation.HRESULT)((delegate* unmanaged[MemberFunction]<global::Windows.Win32.System.WinRT.IStorageProviderQuotaUI*, ulong*, int>)(lpVtbl[6]))
((global::Windows.Win32.System.WinRT.IStorageProviderQuotaUI*)global::System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), value);
}
[global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public partial global::Windows.Win32.Foundation.HRESULT GetQuotaUsedInBytes(ulong* value)
{
return (global::Windows.Win32.Foundation.HRESULT)((delegate* unmanaged[MemberFunction]<global::Windows.Win32.System.WinRT.IStorageProviderQuotaUI*, ulong*, int>)(lpVtbl[8]))
((global::Windows.Win32.System.WinRT.IStorageProviderQuotaUI*)global::System.Runtime.CompilerServices.Unsafe.AsPointer(ref this), value);
}
}- Prerequisites
- Windows 10 (Build 10.0.17763.0) onwards and Windows 11
- Visual Studio 2022
- .NET 10 SDK
- Clone the repo
- Open the solution
- Build the solution