diff --git a/.gitignore b/.gitignore
index f6211b745..1f60a7cac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,6 @@ global.json
.nuget
.nupkg
nuget/Microsoft.Windows.CsWinRT.Prerelease.targets
+*.binlog
+vs_buildtools.exe
+.buildtools
\ No newline at end of file
diff --git a/Directory.Build.props b/Directory.Build.props
index f8dd4e42b..f361fe480 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -40,11 +40,6 @@
$([MSBuild]::NormalizeDirectory('$(BuildOutDir)', '$(MSBuildProjectName)', 'obj'))
-
- Windows
- 10.0.18362.0
-
-
true
true
@@ -66,7 +61,6 @@
pch.h
VERSION_NUMBER="$(VersionNumber)";VERSION_STRING="$(VersionString)";NOMINMAX;%(PreprocessorDefinitions)
true
- %(AdditionalIncludeDirectories)
%(AdditionalOptions) /bigobj
diff --git a/Directory.Build.targets b/Directory.Build.targets
index 6931e28af..b27d1ac17 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -19,11 +19,16 @@
https://api.nuget.org/v3/index.json;
https://dotnet.myget.org/F/roslyn/api/v3/index.json;
https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json;
+ https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json;
-
+
+
+
+
+
diff --git a/Projections/WinUI/WinUI.csproj b/Projections/WinUI/WinUI.csproj
index 0097e3c07..99c53f5cd 100644
--- a/Projections/WinUI/WinUI.csproj
+++ b/Projections/WinUI/WinUI.csproj
@@ -23,7 +23,7 @@
- compile; build; runtime
+ build; buildtransitive; compile; runtime
diff --git a/README.md b/README.md
index aedd3b4fb..535ad423d 100644
--- a/README.md
+++ b/README.md
@@ -32,19 +32,16 @@ Component Authors need to build a C#/WinRT projection for .NET5+ targets.
However, C#/WinRT is a general effort and is intended to support other scenarios and versions of the .NET runtime, compatible down to .NET Standard 2.0.
-## Running C#/WinRT
+## Installing and running C#/WinRT
Download the C#/WinRT NuGet package here:
-Please see [usage](USAGE.md) for details on running the C#/WinRT tool. For additional documentation visit .
+C#/WinRT currently requires the following packages, or newer, to build:
-## Building C#/WinRT
-
-C#/WinRT currently requires the following packages to build:
-
-- Visual Studio 16.6 (more specifically, MSBuild 16.6.0 for "net5.0" TFM support)
-- Microsoft.Net.Compilers.Toolset >= 3.7.0 or Visual Studio 16.8 preview (for function pointer support)
-- .NET 5 SDK 5.0.100-preview.5.20279.10
+- Visual Studio 16.8 Preview 3
+- Microsoft.Net.Compilers.Toolset 3.8.0-3.20428.4
+- .NET 5 SDK 5.0.100-rc.1.20454.5
+- Nuget.exe 5.8.0-preview.2
- WinUI 3 3.0.0-preview1.200515.3
**Note:** As prereleases may make breaking changes before final release, any other combinations above may work but are not supported and will generate a build warning.
@@ -57,7 +54,9 @@ After a successful command-line build, the cswinrt.sln can be launched from the
**Note:** When building the first time, the build clones the testwinrt project. The build depends on this project, but msbuild doesn't consistently pick up the change when the repo is first cloned repo. You may need to build a second time if this is your first build to address the timing issue.
-Please see the [repository structure](STRUCTURE.md) for a detailed breakdown on the repo contents.
+## Developer Guidance
+
+Please read the [usage](USAGE.md) and [repository structure](STRUCTURE.md) docs for a detailed breakdown. For additional documentation visit .
## Related Projects
diff --git a/UnitTest/UnitTest.csproj b/UnitTest/UnitTest.csproj
index f609e7f63..2f9e655a3 100644
--- a/UnitTest/UnitTest.csproj
+++ b/UnitTest/UnitTest.csproj
@@ -1,7 +1,7 @@
-
+
netcoreapp2.0;net5.0
false
AnyCPU;x64;x86
@@ -10,8 +10,6 @@
8
true
1701;1702;0436;1658
- 10.0.18362.0
- netcoreapp5.0
@@ -20,26 +18,17 @@
-
-
-
-
-
-
-
-
-
-
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/WinRT.Host/WinRT.Host.vcxproj b/WinRT.Host/WinRT.Host.vcxproj
index 3ff1be395..ba13535b2 100644
--- a/WinRT.Host/WinRT.Host.vcxproj
+++ b/WinRT.Host/WinRT.Host.vcxproj
@@ -178,6 +178,13 @@
UseLinkTimeCodeGeneration
+
+
+
+ /GL- %(AdditionalOptions)
+
+
diff --git a/WinRT.Runtime/ComWrappersSupport.net5.cs b/WinRT.Runtime/ComWrappersSupport.net5.cs
index 3ec14b00e..20e69044a 100644
--- a/WinRT.Runtime/ComWrappersSupport.net5.cs
+++ b/WinRT.Runtime/ComWrappersSupport.net5.cs
@@ -113,9 +113,9 @@ static unsafe DefaultComWrappers()
IUnknownVftblPtr = RuntimeHelpers.AllocateTypeAssociatedMemory(typeof(IUnknownVftbl), sizeof(IUnknownVftbl));
(*(IUnknownVftbl*)IUnknownVftblPtr) = new IUnknownVftbl
{
- QueryInterface = (delegate* stdcall)qi,
- AddRef = (delegate* stdcall)addRef,
- Release = (delegate* stdcall)release,
+ QueryInterface = (delegate* unmanaged[Stdcall])qi,
+ AddRef = (delegate* unmanaged[Stdcall])addRef,
+ Release = (delegate* unmanaged[Stdcall])release,
};
}
diff --git a/WinRT.Runtime/ComWrappersSupport.netstandard2.0.cs b/WinRT.Runtime/ComWrappersSupport.netstandard2.0.cs
index 15d340f00..d1faf5d22 100644
--- a/WinRT.Runtime/ComWrappersSupport.netstandard2.0.cs
+++ b/WinRT.Runtime/ComWrappersSupport.netstandard2.0.cs
@@ -129,9 +129,9 @@ static unsafe ComWrappersSupport()
IUnknownVftblPtr = Marshal.AllocHGlobal(sizeof(IUnknownVftbl));
(*(IUnknownVftbl*)IUnknownVftblPtr) = new IUnknownVftbl
{
- QueryInterface = (delegate* stdcall)Marshal.GetFunctionPointerForDelegate(Abi_QueryInterface),
- AddRef = (delegate* stdcall)Marshal.GetFunctionPointerForDelegate(Abi_AddRef),
- Release = (delegate* stdcall)Marshal.GetFunctionPointerForDelegate(Abi_Release),
+ QueryInterface = (delegate* unmanaged[Stdcall])Marshal.GetFunctionPointerForDelegate(Abi_QueryInterface),
+ AddRef = (delegate* unmanaged[Stdcall])Marshal.GetFunctionPointerForDelegate(Abi_AddRef),
+ Release = (delegate* unmanaged[Stdcall])Marshal.GetFunctionPointerForDelegate(Abi_Release),
};
}
diff --git a/WinRT.Runtime/IInspectable.cs b/WinRT.Runtime/IInspectable.cs
index 7d21134c5..fc056ca01 100644
--- a/WinRT.Runtime/IInspectable.cs
+++ b/WinRT.Runtime/IInspectable.cs
@@ -23,13 +23,13 @@ public unsafe struct Vftbl
{
public IUnknownVftbl IUnknownVftbl;
private void* _GetIids;
- public delegate* stdcall GetIids { get => (delegate* stdcall)_GetIids; set => _GetIids = (void*)value; }
+ public delegate* unmanaged[Stdcall] GetIids { get => (delegate* unmanaged[Stdcall])_GetIids; set => _GetIids = (void*)value; }
private void* _GetRuntimeClassName;
- public delegate* stdcall GetRuntimeClassName { get => (delegate* stdcall)_GetRuntimeClassName; set => _GetRuntimeClassName = (void*)value; }
+ public delegate* unmanaged[Stdcall] GetRuntimeClassName { get => (delegate* unmanaged[Stdcall])_GetRuntimeClassName; set => _GetRuntimeClassName = (void*)value; }
private void* _GetTrustLevel;
- public delegate* stdcall GetTrustLevel { get => (delegate* stdcall)_GetTrustLevel; set => _GetTrustLevel = (void*)value; }
+ public delegate* unmanaged[Stdcall] GetTrustLevel { get => (delegate* unmanaged[Stdcall])_GetTrustLevel; set => _GetTrustLevel = (void*)value; }
public static readonly Vftbl AbiToProjectionVftable;
public static readonly IntPtr AbiToProjectionVftablePtr;
diff --git a/WinRT.Runtime/Interop/ExceptionErrorInfo.cs b/WinRT.Runtime/Interop/ExceptionErrorInfo.cs
index d25572610..614f8c1f2 100644
--- a/WinRT.Runtime/Interop/ExceptionErrorInfo.cs
+++ b/WinRT.Runtime/Interop/ExceptionErrorInfo.cs
@@ -94,15 +94,15 @@ public struct Vftbl
{
internal global::WinRT.Interop.IUnknownVftbl IUnknownVftbl;
private void* _GetGuid_0;
- public delegate* stdcall GetGuid_0 { get => (delegate* stdcall)_GetGuid_0; set => _GetGuid_0 = value; }
+ public delegate* unmanaged[Stdcall] GetGuid_0 { get => (delegate* unmanaged[Stdcall])_GetGuid_0; set => _GetGuid_0 = value; }
private void* _GetSource_1;
- public delegate* stdcall GetSource_1 { get => (delegate* stdcall)_GetSource_1; set => _GetSource_1 = value; }
+ public delegate* unmanaged[Stdcall] GetSource_1 { get => (delegate* unmanaged[Stdcall])_GetSource_1; set => _GetSource_1 = value; }
private void* _GetDescription_2;
- public delegate* stdcall GetDescription_2 { get => (delegate* stdcall)_GetDescription_2; set => _GetDescription_2 = value; }
+ public delegate* unmanaged[Stdcall] GetDescription_2 { get => (delegate* unmanaged[Stdcall])_GetDescription_2; set => _GetDescription_2 = value; }
private void* _GetHelpFile_3;
- public delegate* stdcall GetHelpFile_3 { get => (delegate* stdcall)_GetHelpFile_3; set => _GetHelpFile_3 = value; }
+ public delegate* unmanaged[Stdcall] GetHelpFile_3 { get => (delegate* unmanaged[Stdcall])_GetHelpFile_3; set => _GetHelpFile_3 = value; }
private void* _GetHelpFileContent_4;
- public delegate* stdcall GetHelpFileContent_4 { get => (delegate* stdcall)_GetHelpFileContent_4; set => _GetHelpFileContent_4 = value; }
+ public delegate* unmanaged[Stdcall] GetHelpFileContent_4 { get => (delegate* unmanaged[Stdcall])_GetHelpFileContent_4; set => _GetHelpFileContent_4 = value; }
private static readonly Vftbl AbiToProjectionVftable;
public static readonly IntPtr AbiToProjectionVftablePtr;
@@ -325,7 +325,7 @@ public struct Vftbl
{
internal global::WinRT.Interop.IUnknownVftbl IUnknownVftbl;
private void* _GetLanguageException_0;
- public delegate* stdcall GetLanguageException_0 => (delegate* stdcall)_GetLanguageException_0;
+ public delegate* unmanaged[Stdcall] GetLanguageException_0 => (delegate* unmanaged[Stdcall])_GetLanguageException_0;
}
public static ObjectReference FromAbi(IntPtr thisPtr) => ObjectReference.FromAbi(thisPtr);
@@ -369,7 +369,7 @@ public struct Vftbl
{
internal global::WinRT.Interop.IUnknownVftbl IUnknownVftbl;
private void* _InterfaceSupportsErrorInfo_0;
- public delegate* stdcall InterfaceSupportsErrorInfo_0 { get => (delegate* stdcall)_InterfaceSupportsErrorInfo_0; set => _InterfaceSupportsErrorInfo_0 = value; }
+ public delegate* unmanaged[Stdcall] InterfaceSupportsErrorInfo_0 { get => (delegate* unmanaged[Stdcall])_InterfaceSupportsErrorInfo_0; set => _InterfaceSupportsErrorInfo_0 = value; }
private static readonly Vftbl AbiToProjectionVftable;
public static readonly IntPtr AbiToProjectionVftablePtr;
@@ -440,9 +440,9 @@ public struct Vftbl
internal global::WinRT.Interop.IUnknownVftbl unknownVftbl;
private void* _GetErrorDetails_0;
- public delegate* stdcall GetErrorDetails_0 => (delegate* stdcall)_GetErrorDetails_0;
+ public delegate* unmanaged[Stdcall] GetErrorDetails_0 => (delegate* unmanaged[Stdcall])_GetErrorDetails_0;
private void* _GetReference_1;
- public delegate* stdcall GetReference_1 => (delegate* stdcall)_GetReference_1;
+ public delegate* unmanaged[Stdcall] GetReference_1 => (delegate* unmanaged[Stdcall])_GetReference_1;
}
public static ObjectReference FromAbi(IntPtr thisPtr) => ObjectReference.FromAbi(thisPtr);
diff --git a/WinRT.Runtime/Interop/IAgileReference.cs b/WinRT.Runtime/Interop/IAgileReference.cs
index fcc24bf87..9f633eb45 100644
--- a/WinRT.Runtime/Interop/IAgileReference.cs
+++ b/WinRT.Runtime/Interop/IAgileReference.cs
@@ -41,7 +41,7 @@ public struct Vftbl
{
public global::WinRT.Interop.IUnknownVftbl IUnknownVftbl;
private void* _Resolve;
- public delegate* stdcall Resolve { get => (delegate* stdcall)_Resolve; set => _Resolve = value; }
+ public delegate* unmanaged[Stdcall] Resolve { get => (delegate* unmanaged[Stdcall])_Resolve; set => _Resolve = value; }
public static readonly Vftbl AbiToProjectionVftable;
public static readonly IntPtr AbiToProjectionVftablePtr;
@@ -163,11 +163,11 @@ public struct Vftbl
{
public global::WinRT.Interop.IUnknownVftbl IUnknownVftbl;
private void* _RegisterInterfaceInGlobal;
- public delegate* stdcall RegisterInterfaceInGlobal => (delegate* stdcall)_RegisterInterfaceInGlobal;
+ public delegate* unmanaged[Stdcall] RegisterInterfaceInGlobal => (delegate* unmanaged[Stdcall])_RegisterInterfaceInGlobal;
private void* _RevokeInterfaceFromGlobal;
- public delegate* stdcall RevokeInterfaceFromGlobal => (delegate* stdcall)_RevokeInterfaceFromGlobal;
+ public delegate* unmanaged[Stdcall] RevokeInterfaceFromGlobal => (delegate* unmanaged[Stdcall])_RevokeInterfaceFromGlobal;
private void* _GetInterfaceFromGlobal;
- public delegate* stdcall GetInterfaceFromGlobal => (delegate* stdcall)_GetInterfaceFromGlobal;
+ public delegate* unmanaged[Stdcall] GetInterfaceFromGlobal => (delegate* unmanaged[Stdcall])_GetInterfaceFromGlobal;
}
public static ObjectReference FromAbi(IntPtr thisPtr) => ObjectReference.FromAbi(thisPtr);
diff --git a/WinRT.Runtime/Interop/IContextCallback.cs b/WinRT.Runtime/Interop/IContextCallback.cs
index f2860e729..447156db1 100644
--- a/WinRT.Runtime/Interop/IContextCallback.cs
+++ b/WinRT.Runtime/Interop/IContextCallback.cs
@@ -43,10 +43,10 @@ public struct Vftbl
{
global::WinRT.Interop.IUnknownVftbl IUnknownVftbl;
private void* _ContextCallback;
- public delegate* stdcall ContextCallback_4
- {
- get => (delegate* stdcall)_ContextCallback;
- set => _ContextCallback = (void*)value;
+ public delegate* unmanaged[Stdcall] ContextCallback_4
+ {
+ get => (delegate* unmanaged[Stdcall])_ContextCallback;
+ set => _ContextCallback = (void*)value;
}
}
public static ObjectReference FromAbi(IntPtr thisPtr) => ObjectReference.FromAbi(thisPtr);
@@ -75,9 +75,9 @@ public unsafe void ContextCallback(global::WinRT.Interop.PFNCONTEXTCALL pfnCallb
{
var callback = Marshal.GetFunctionPointerForDelegate(pfnCallback);
var result = _obj.Vftbl.ContextCallback_4(ThisPtr, callback, pParam, &riid, iMethod, IntPtr.Zero);
- GC.KeepAlive(pfnCallback);
- if (result != RPC_E_DISCONNECTED)
- {
+ GC.KeepAlive(pfnCallback);
+ if (result != RPC_E_DISCONNECTED)
+ {
Marshal.ThrowExceptionForHR(result);
}
}
diff --git a/WinRT.Runtime/Interop/IUnknownVftbl.cs b/WinRT.Runtime/Interop/IUnknownVftbl.cs
index 977cfedee..8a81c4c0a 100644
--- a/WinRT.Runtime/Interop/IUnknownVftbl.cs
+++ b/WinRT.Runtime/Interop/IUnknownVftbl.cs
@@ -9,11 +9,11 @@ namespace WinRT.Interop
public unsafe struct IUnknownVftbl
{
private void* _QueryInterface;
- public delegate* stdcall QueryInterface { get => (delegate* stdcall)_QueryInterface; set => _QueryInterface = (void*)value; }
+ public delegate* unmanaged[Stdcall] QueryInterface { get => (delegate* unmanaged[Stdcall])_QueryInterface; set => _QueryInterface = (void*)value; }
private void* _AddRef;
- public delegate* stdcall AddRef { get => (delegate* stdcall)_AddRef; set => _AddRef = (void*)value; }
+ public delegate* unmanaged[Stdcall] AddRef { get => (delegate* unmanaged[Stdcall])_AddRef; set => _AddRef = (void*)value; }
private void* _Release;
- public delegate* stdcall Release { get => (delegate* stdcall)_Release; set => _Release = (void*)value; }
+ public delegate* unmanaged[Stdcall] Release { get => (delegate* unmanaged[Stdcall])_Release; set => _Release = (void*)value; }
public static IUnknownVftbl AbiToProjectionVftbl => ComWrappersSupport.IUnknownVftbl;
public static IntPtr AbiToProjectionVftblPtr => ComWrappersSupport.IUnknownVftblPtr;
diff --git a/WinRT.Runtime/Interop/IWeakReferenceSource.cs b/WinRT.Runtime/Interop/IWeakReferenceSource.cs
index 8ed51d255..30d35594b 100644
--- a/WinRT.Runtime/Interop/IWeakReferenceSource.cs
+++ b/WinRT.Runtime/Interop/IWeakReferenceSource.cs
@@ -56,7 +56,7 @@ internal struct Vftbl
{
public global::WinRT.Interop.IUnknownVftbl IUnknownVftbl;
private void* _GetWeakReference;
- public delegate* stdcall GetWeakReference { get => (delegate* stdcall)_GetWeakReference; set => _GetWeakReference = value; }
+ public delegate* unmanaged[Stdcall] GetWeakReference { get => (delegate* unmanaged[Stdcall])_GetWeakReference; set => _GetWeakReference = value; }
public static readonly Vftbl AbiToProjectionVftable;
public static readonly IntPtr AbiToProjectionVftablePtr;
@@ -136,7 +136,7 @@ public struct Vftbl
{
public global::WinRT.Interop.IUnknownVftbl IUnknownVftbl;
private void* _Resolve;
- public delegate* stdcall Resolve { get => (delegate* stdcall)_Resolve; set => _Resolve = value; }
+ public delegate* unmanaged[Stdcall] Resolve { get => (delegate* unmanaged[Stdcall])_Resolve; set => _Resolve = value; }
public static readonly Vftbl AbiToProjectionVftable;
public static readonly IntPtr AbiToProjectionVftablePtr;
diff --git a/WinRT.Runtime/Projections/Bindable.cs b/WinRT.Runtime/Projections/Bindable.cs
index da9005b3f..0efcff77c 100644
--- a/WinRT.Runtime/Projections/Bindable.cs
+++ b/WinRT.Runtime/Projections/Bindable.cs
@@ -66,11 +66,11 @@ public struct Vftbl
{
internal IInspectable.Vftbl IInspectableVftbl;
private void* _get_Current_0;
- public delegate* stdcall get_Current_0 { get => (delegate* stdcall)_get_Current_0; set => _get_Current_0 = value; }
+ public delegate* unmanaged[Stdcall] get_Current_0 { get => (delegate* unmanaged[Stdcall])_get_Current_0; set => _get_Current_0 = value; }
private void* _get_HasCurrent_1;
- public delegate* stdcall get_HasCurrent_1 { get => (delegate* stdcall)_get_HasCurrent_1; set => _get_HasCurrent_1 = value; }
+ public delegate* unmanaged[Stdcall] get_HasCurrent_1 { get => (delegate* unmanaged[Stdcall])_get_HasCurrent_1; set => _get_HasCurrent_1 = value; }
private void* _MoveNext_2;
- public delegate* stdcall MoveNext_2 { get => (delegate* stdcall)_MoveNext_2; set => _MoveNext_2 = value; }
+ public delegate* unmanaged[Stdcall] MoveNext_2 { get => (delegate* unmanaged[Stdcall])_MoveNext_2; set => _MoveNext_2 = value; }
private static readonly Vftbl AbiToProjectionVftable;
public static readonly IntPtr AbiToProjectionVftablePtr;
@@ -221,11 +221,11 @@ public struct Vftbl
{
internal IInspectable.Vftbl IInspectableVftbl;
private void* _GetAt_0;
- public delegate* stdcall GetAt_0 { get => (delegate* stdcall)_GetAt_0; set => _GetAt_0 = value; }
+ public delegate* unmanaged[Stdcall] GetAt_0 { get => (delegate* unmanaged[Stdcall])_GetAt_0; set => _GetAt_0 = value; }
private void* _get_Size_1;
- public delegate* stdcall get_Size_1 { get => (delegate* stdcall)_get_Size_1; set => _get_Size_1 = value; }
+ public delegate* unmanaged[Stdcall] get_Size_1 { get => (delegate* unmanaged[Stdcall])_get_Size_1; set => _get_Size_1 = value; }
private void* _IndexOf_2;
- public delegate* stdcall IndexOf_2 { get => (delegate* stdcall)_IndexOf_2; set => _IndexOf_2 = value; }
+ public delegate* unmanaged[Stdcall] IndexOf_2 { get => (delegate* unmanaged[Stdcall])_IndexOf_2; set => _IndexOf_2 = value; }
private static readonly Vftbl AbiToProjectionVftable;
public static readonly IntPtr AbiToProjectionVftablePtr;
@@ -459,7 +459,7 @@ public struct Vftbl
{
internal IInspectable.Vftbl IInspectableVftbl;
private void* _First_0;
- public delegate* stdcall First_0 { get => (delegate* stdcall)_First_0; set => _First_0 = value; }
+ public delegate* unmanaged[Stdcall] First_0 { get => (delegate* unmanaged[Stdcall])_First_0; set => _First_0 = value; }
private static readonly Vftbl AbiToProjectionVftable;
public static readonly IntPtr AbiToProjectionVftablePtr;
@@ -996,16 +996,16 @@ public struct Vftbl
private void* _RemoveAtEnd_8;
private void* _Clear_9;
- public delegate* stdcall GetAt_0 { get => (delegate* stdcall)_GetAt_0; set => _GetAt_0 = value; }
- public delegate* stdcall get_Size_1 { get => (delegate* stdcall)_get_Size_1; set => _get_Size_1 = value; }
- public delegate* stdcall GetView_2 { get => (delegate* stdcall)_GetView_2; set => _GetView_2 = value; }
- public delegate* stdcall IndexOf_3 { get => (delegate* stdcall)_IndexOf_3; set => _IndexOf_3 = value; }
- public delegate* stdcall SetAt_4 { get => (delegate* stdcall)_SetAt_4; set => _SetAt_4 = value; }
- public delegate* stdcall InsertAt_5 { get => (delegate* stdcall)_InsertAt_5; set => _InsertAt_5 = value; }
- public delegate* stdcall RemoveAt_6 { get => (delegate* stdcall)_RemoveAt_6; set => _RemoveAt_6 = value; }
- public delegate* stdcall Append_7 { get => (delegate* stdcall)_Append_7; set => _Append_7 = value; }
- public delegate* stdcall RemoveAtEnd_8 { get => (delegate* stdcall)_RemoveAtEnd_8; set => _RemoveAtEnd_8 = value; }
- public delegate* stdcall Clear_9 { get => (delegate* stdcall)_Clear_9; set => _Clear_9 = value; }
+ public delegate* unmanaged[Stdcall] GetAt_0 { get => (delegate* unmanaged[Stdcall])_GetAt_0; set => _GetAt_0 = value; }
+ public delegate* unmanaged[Stdcall] get_Size_1 { get => (delegate* unmanaged[Stdcall])_get_Size_1; set => _get_Size_1 = value; }
+ public delegate* unmanaged[Stdcall] GetView_2 { get => (delegate* unmanaged[Stdcall])_GetView_2; set => _GetView_2 = value; }
+ public delegate* unmanaged[Stdcall] IndexOf_3 { get => (delegate* unmanaged[Stdcall])_IndexOf_3; set => _IndexOf_3 = value; }
+ public delegate* unmanaged[Stdcall] SetAt_4 { get => (delegate* unmanaged[Stdcall])_SetAt_4; set => _SetAt_4 = value; }
+ public delegate* unmanaged[Stdcall] InsertAt_5 { get => (delegate* unmanaged[Stdcall])_InsertAt_5; set => _InsertAt_5 = value; }
+ public delegate* unmanaged[Stdcall] RemoveAt_6 { get => (delegate* unmanaged[Stdcall])_RemoveAt_6; set => _RemoveAt_6 = value; }
+ public delegate* unmanaged[Stdcall] Append_7 { get => (delegate* unmanaged[Stdcall])_Append_7; set => _Append_7 = value; }
+ public delegate* unmanaged[Stdcall] RemoveAtEnd_8 { get => (delegate* unmanaged[Stdcall])_RemoveAtEnd_8; set => _RemoveAtEnd_8 = value; }
+ public delegate* unmanaged[Stdcall] Clear_9 { get => (delegate* unmanaged[Stdcall])_Clear_9; set => _Clear_9 = value; }
private static readonly Vftbl AbiToProjectionVftable;
public static readonly IntPtr AbiToProjectionVftablePtr;
diff --git a/WinRT.Runtime/Projections/ICommand.cs b/WinRT.Runtime/Projections/ICommand.cs
index 695538c27..b76f0bc7c 100644
--- a/WinRT.Runtime/Projections/ICommand.cs
+++ b/WinRT.Runtime/Projections/ICommand.cs
@@ -121,8 +121,8 @@ private static unsafe int Do_Abi_Invoke(IntPtr thisPtr, IntPtr sender, IntPtr ar
internal sealed unsafe class CanExecuteChangedEventSource : EventSource
{
internal CanExecuteChangedEventSource(IObjectReference obj,
- delegate* stdcall addHandler,
- delegate* stdcall removeHandler)
+ delegate* unmanaged[Stdcall] addHandler,
+ delegate* unmanaged[Stdcall] removeHandler)
: base(obj, addHandler, removeHandler)
{
}
@@ -146,13 +146,13 @@ public struct Vftbl
{
internal IInspectable.Vftbl IInspectableVftbl;
private void* _add_CanExecuteChanged_0;
- public delegate* stdcall add_CanExecuteChanged_0 { get => (delegate* stdcall)_add_CanExecuteChanged_0; set => _add_CanExecuteChanged_0 = value; }
+ public delegate* unmanaged[Stdcall] add_CanExecuteChanged_0 { get => (delegate* unmanaged[Stdcall])_add_CanExecuteChanged_0; set => _add_CanExecuteChanged_0 = value; }
private void* _remove_CanExecuteChanged_1;
- public delegate* stdcall remove_CanExecuteChanged_1 { get => (delegate* stdcall)_remove_CanExecuteChanged_1; set => _remove_CanExecuteChanged_1 = value; }
+ public delegate* unmanaged[Stdcall] remove_CanExecuteChanged_1 { get => (delegate* unmanaged[Stdcall])_remove_CanExecuteChanged_1; set => _remove_CanExecuteChanged_1 = value; }
private void* _CanExecute_2;
- public delegate* stdcall CanExecute_2 { get => (delegate* stdcall)_CanExecute_2; set => _CanExecute_2 = value; }
+ public delegate* unmanaged[Stdcall] CanExecute_2 { get => (delegate* unmanaged[Stdcall])_CanExecute_2; set => _CanExecute_2 = value; }
private void* _Execute_3;
- public delegate* stdcall Execute_3 { get => (delegate* stdcall)_Execute_3; set => _Execute_3 = value; }
+ public delegate* unmanaged[Stdcall] Execute_3 { get => (delegate* unmanaged[Stdcall])_Execute_3; set => _Execute_3 = value; }
private static readonly Vftbl AbiToProjectionVftable;
public static readonly IntPtr AbiToProjectionVftablePtr;
diff --git a/WinRT.Runtime/Projections/IDisposable.cs b/WinRT.Runtime/Projections/IDisposable.cs
index 00656c2c3..0de5a7066 100644
--- a/WinRT.Runtime/Projections/IDisposable.cs
+++ b/WinRT.Runtime/Projections/IDisposable.cs
@@ -16,7 +16,7 @@ public struct Vftbl
private delegate int CloseDelegate(IntPtr thisPtr);
internal IInspectable.Vftbl IInspectableVftbl;
private void* _Close_0;
- public delegate* stdcall Close_0 { get => (delegate* stdcall)_Close_0; set => _Close_0 = value; }
+ public delegate* unmanaged[Stdcall] Close_0 { get => (delegate* unmanaged[Stdcall])_Close_0; set => _Close_0 = value; }
private static readonly Vftbl AbiToProjectionVftable;
public static readonly IntPtr AbiToProjectionVftablePtr;
diff --git a/WinRT.Runtime/Projections/INotifyCollectionChanged.cs b/WinRT.Runtime/Projections/INotifyCollectionChanged.cs
index a5a88db1c..d2a2ef70a 100644
--- a/WinRT.Runtime/Projections/INotifyCollectionChanged.cs
+++ b/WinRT.Runtime/Projections/INotifyCollectionChanged.cs
@@ -18,14 +18,14 @@ public struct Vftbl
internal IInspectable.Vftbl IInspectableVftbl;
#if NETSTANDARD2_0
private void* _add_CollectionChanged_0;
- public delegate* stdcall add_CollectionChanged_0 { get => (delegate* stdcall)_add_CollectionChanged_0; set => _add_CollectionChanged_0=(void*)value; }
+ public delegate* unmanaged[Stdcall] add_CollectionChanged_0 { get => (delegate* unmanaged[Stdcall])_add_CollectionChanged_0; set => _add_CollectionChanged_0=(void*)value; }
private void* _remove_CollectionChanged_1;
- public delegate* stdcall remove_CollectionChanged_1 { get => (delegate* stdcall)_remove_CollectionChanged_1; set => _remove_CollectionChanged_1=(void*)value; }
+ public delegate* unmanaged[Stdcall] remove_CollectionChanged_1 { get => (delegate* unmanaged[Stdcall])_remove_CollectionChanged_1; set => _remove_CollectionChanged_1=(void*)value; }
#else
private delegate* _add_CollectionChanged_0;
- public delegate* stdcall add_CollectionChanged_0 { get => (delegate* stdcall)_add_CollectionChanged_0; set => _add_CollectionChanged_0=(delegate*)value; }
+ public delegate* unmanaged[Stdcall] add_CollectionChanged_0 { get => (delegate* unmanaged[Stdcall])_add_CollectionChanged_0; set => _add_CollectionChanged_0=(delegate*)value; }
private delegate* _remove_CollectionChanged_1;
- public delegate* stdcall remove_CollectionChanged_1 { get => (delegate* stdcall)_remove_CollectionChanged_1; set => _remove_CollectionChanged_1=(delegate*)value; }
+ public delegate* unmanaged[Stdcall] remove_CollectionChanged_1 { get => (delegate* unmanaged[Stdcall])_remove_CollectionChanged_1; set => _remove_CollectionChanged_1=(delegate*)value; }
#endif
private static readonly Vftbl AbiToProjectionVftable;
diff --git a/WinRT.Runtime/Projections/INotifyPropertyChanged.cs b/WinRT.Runtime/Projections/INotifyPropertyChanged.cs
index 8fbe9b1c6..58f4c9005 100644
--- a/WinRT.Runtime/Projections/INotifyPropertyChanged.cs
+++ b/WinRT.Runtime/Projections/INotifyPropertyChanged.cs
@@ -18,14 +18,14 @@ public struct Vftbl
internal IInspectable.Vftbl IInspectableVftbl;
#if NETSTANDARD2_0
private void* _add_PropertyChanged_0;
- public delegate* stdcall add_PropertyChanged_0 { get => (delegate* stdcall)_add_PropertyChanged_0; set => _add_PropertyChanged_0=(void*)value; }
+ public delegate* unmanaged[Stdcall] add_PropertyChanged_0 { get => (delegate* unmanaged[Stdcall])_add_PropertyChanged_0; set => _add_PropertyChanged_0=(void*)value; }
private void* _remove_PropertyChanged_1;
- public delegate* stdcall remove_PropertyChanged_1 { get => (delegate* stdcall)_remove_PropertyChanged_1; set => _remove_PropertyChanged_1=(void*)value; }
+ public delegate* unmanaged[Stdcall] remove_PropertyChanged_1 { get => (delegate* unmanaged[Stdcall])_remove_PropertyChanged_1; set => _remove_PropertyChanged_1=(void*)value; }
#else
private delegate* _add_PropertyChanged_0;
- public delegate* stdcall add_PropertyChanged_0 { get => (delegate* stdcall)_add_PropertyChanged_0; set => _add_PropertyChanged_0=(delegate*)value; }
+ public delegate* unmanaged[Stdcall] add_PropertyChanged_0 { get => (delegate* unmanaged[Stdcall])_add_PropertyChanged_0; set => _add_PropertyChanged_0=(delegate*)value; }
private delegate* _remove_PropertyChanged_1;
- public delegate* stdcall remove_PropertyChanged_1 { get => (delegate* stdcall)_remove_PropertyChanged_1; set => _remove_PropertyChanged_1=(delegate*)value; }
+ public delegate* unmanaged[Stdcall] remove_PropertyChanged_1 { get => (delegate* unmanaged[Stdcall])_remove_PropertyChanged_1; set => _remove_PropertyChanged_1=(delegate*)value; }
#endif
private static readonly Vftbl AbiToProjectionVftable;
diff --git a/WinRT.Runtime/Projections/IPropertyValue.cs b/WinRT.Runtime/Projections/IPropertyValue.cs
index 529464858..7d77a1af3 100644
--- a/WinRT.Runtime/Projections/IPropertyValue.cs
+++ b/WinRT.Runtime/Projections/IPropertyValue.cs
@@ -6,7 +6,7 @@
using WinRT.Interop;
namespace Windows.Foundation
-{
+{
internal enum PropertyType : uint
{
Empty = 0,
@@ -104,95 +104,95 @@ internal static class ManagedIPropertyValueImpl
private const int TYPE_E_TYPEMISMATCH = unchecked((int)0x80028CA0);
private const int DISP_E_OVERFLOW = unchecked((int)0x8002000A);
private static IPropertyValue.Vftbl AbiToProjectionVftable;
- public static IntPtr AbiToProjectionVftablePtr;
-
+ public static IntPtr AbiToProjectionVftablePtr;
+
#if NETSTANDARD2_0
- private static readonly Delegate[] DelegateCache = new Delegate[39];
+ private static readonly Delegate[] DelegateCache = new Delegate[39];
#endif
static unsafe ManagedIPropertyValueImpl()
{
AbiToProjectionVftable = new IPropertyValue.Vftbl
{
- IInspectableVftbl = global::WinRT.IInspectable.Vftbl.AbiToProjectionVftable,
-#if NETSTANDARD2_0
- _get_Type_0 = Marshal.GetFunctionPointerForDelegate(DelegateCache[0] = new IPropertyValue_Delegates.get_Type_0(Do_Abi_get_Type_0)).ToPointer(),
- _get_IsNumericScalar_1 = Marshal.GetFunctionPointerForDelegate(DelegateCache[1] = new IPropertyValue_Delegates.get_IsNumericScalar_1(Do_Abi_get_IsNumericScalar_1)).ToPointer(),
- _GetUInt8_2 = Marshal.GetFunctionPointerForDelegate(DelegateCache[2] = new IPropertyValue_Delegates.GetUInt8_2(Do_Abi_GetUInt8_2)).ToPointer(),
- _GetInt16_3 = Marshal.GetFunctionPointerForDelegate(DelegateCache[3] = new IPropertyValue_Delegates.GetInt16_3(Do_Abi_GetInt16_3)).ToPointer(),
- _GetUInt16_4 = Marshal.GetFunctionPointerForDelegate(DelegateCache[4] = new IPropertyValue_Delegates.GetUInt16_4(Do_Abi_GetUInt16_4)).ToPointer(),
- _GetInt32_5 = Marshal.GetFunctionPointerForDelegate(DelegateCache[5] = new IPropertyValue_Delegates.GetInt32_5(Do_Abi_GetInt32_5)).ToPointer(),
- _GetUInt32_6 = Marshal.GetFunctionPointerForDelegate(DelegateCache[6] = new IPropertyValue_Delegates.GetUInt32_6(Do_Abi_GetUInt32_6)).ToPointer(),
- _GetInt64_7 = Marshal.GetFunctionPointerForDelegate(DelegateCache[7] = new IPropertyValue_Delegates.GetInt64_7(Do_Abi_GetInt64_7)).ToPointer(),
- _GetUInt64_8 = Marshal.GetFunctionPointerForDelegate(DelegateCache[8] = new IPropertyValue_Delegates.GetUInt64_8(Do_Abi_GetUInt64_8)).ToPointer(),
- _GetSingle_9 = Marshal.GetFunctionPointerForDelegate(DelegateCache[9] = new IPropertyValue_Delegates.GetSingle_9(Do_Abi_GetSingle_9)).ToPointer(),
- _GetDouble_10 = Marshal.GetFunctionPointerForDelegate(DelegateCache[10] = new IPropertyValue_Delegates.GetDouble_10(Do_Abi_GetDouble_10)).ToPointer(),
- _GetChar16_11 = Marshal.GetFunctionPointerForDelegate(DelegateCache[11] = new IPropertyValue_Delegates.GetChar16_11(Do_Abi_GetChar16_11)).ToPointer(),
- _GetBoolean_12 = Marshal.GetFunctionPointerForDelegate(DelegateCache[12] = new IPropertyValue_Delegates.GetBoolean_12(Do_Abi_GetBoolean_12)).ToPointer(),
- _GetString_13 = Marshal.GetFunctionPointerForDelegate(DelegateCache[13] = new IPropertyValue_Delegates.GetString_13(Do_Abi_GetString_13)).ToPointer(),
- _GetGuid_14 = Marshal.GetFunctionPointerForDelegate(DelegateCache[14] = new IPropertyValue_Delegates.GetGuid_14(Do_Abi_GetGuid_14)).ToPointer(),
- _GetDateTime_15 = Marshal.GetFunctionPointerForDelegate(DelegateCache[15] = new IPropertyValue_Delegates.GetDateTime_15(Do_Abi_GetDateTime_15)).ToPointer(),
- _GetTimeSpan_16 = Marshal.GetFunctionPointerForDelegate(DelegateCache[16] = new IPropertyValue_Delegates.GetTimeSpan_16(Do_Abi_GetTimeSpan_16)).ToPointer(),
- _GetPoint_17 = Marshal.GetFunctionPointerForDelegate(DelegateCache[17] = new IPropertyValue_Delegates.GetPoint_17(Do_Abi_GetPoint_17)).ToPointer(),
- _GetSize_18 = Marshal.GetFunctionPointerForDelegate(DelegateCache[18] = new IPropertyValue_Delegates.GetSize_18(Do_Abi_GetSize_18)).ToPointer(),
- _GetRect_19 = Marshal.GetFunctionPointerForDelegate(DelegateCache[19] = new IPropertyValue_Delegates.GetRect_19(Do_Abi_GetRect_19)).ToPointer(),
- _GetUInt8Array_20 = Marshal.GetFunctionPointerForDelegate(DelegateCache[20] = new IPropertyValue_Delegates.GetUInt8Array_20(Do_Abi_GetUInt8Array_20)).ToPointer(),
- _GetInt16Array_21 = Marshal.GetFunctionPointerForDelegate(DelegateCache[21] = new IPropertyValue_Delegates.GetInt16Array_21(Do_Abi_GetInt16Array_21)).ToPointer(),
- _GetUInt16Array_22 = Marshal.GetFunctionPointerForDelegate(DelegateCache[22] = new IPropertyValue_Delegates.GetUInt16Array_22(Do_Abi_GetUInt16Array_22)).ToPointer(),
- _GetInt32Array_23 = Marshal.GetFunctionPointerForDelegate(DelegateCache[23] = new IPropertyValue_Delegates.GetInt32Array_23(Do_Abi_GetInt32Array_23)).ToPointer(),
- _GetUInt32Array_24 = Marshal.GetFunctionPointerForDelegate(DelegateCache[24] = new IPropertyValue_Delegates.GetUInt32Array_24(Do_Abi_GetUInt32Array_24)).ToPointer(),
- _GetInt64Array_25 = Marshal.GetFunctionPointerForDelegate(DelegateCache[25] = new IPropertyValue_Delegates.GetInt64Array_25(Do_Abi_GetInt64Array_25)).ToPointer(),
- _GetUInt64Array_26 = Marshal.GetFunctionPointerForDelegate(DelegateCache[26] = new IPropertyValue_Delegates.GetUInt64Array_26(Do_Abi_GetUInt64Array_26)).ToPointer(),
- _GetSingleArray_27 = Marshal.GetFunctionPointerForDelegate(DelegateCache[27] = new IPropertyValue_Delegates.GetSingleArray_27(Do_Abi_GetSingleArray_27)).ToPointer(),
- _GetDoubleArray_28 = Marshal.GetFunctionPointerForDelegate(DelegateCache[28] = new IPropertyValue_Delegates.GetDoubleArray_28(Do_Abi_GetDoubleArray_28)).ToPointer(),
- _GetChar16Array_29 = Marshal.GetFunctionPointerForDelegate(DelegateCache[29] = new IPropertyValue_Delegates.GetChar16Array_29(Do_Abi_GetChar16Array_29)).ToPointer(),
- _GetBooleanArray_30 = Marshal.GetFunctionPointerForDelegate(DelegateCache[30] = new IPropertyValue_Delegates.GetBooleanArray_30(Do_Abi_GetBooleanArray_30)).ToPointer(),
- _GetStringArray_31 = Marshal.GetFunctionPointerForDelegate(DelegateCache[31] = new IPropertyValue_Delegates.GetStringArray_31(Do_Abi_GetStringArray_31)).ToPointer(),
- _GetInspectableArray_32 = Marshal.GetFunctionPointerForDelegate(DelegateCache[32] = new IPropertyValue_Delegates.GetInspectableArray_32(Do_Abi_GetInspectableArray_32)).ToPointer(),
- _GetGuidArray_33 = Marshal.GetFunctionPointerForDelegate(DelegateCache[33] = new IPropertyValue_Delegates.GetGuidArray_33(Do_Abi_GetGuidArray_33)).ToPointer(),
- _GetDateTimeArray_34 = Marshal.GetFunctionPointerForDelegate(DelegateCache[34] = new IPropertyValue_Delegates.GetDateTimeArray_34(Do_Abi_GetDateTimeArray_34)).ToPointer(),
- _GetTimeSpanArray_35 = Marshal.GetFunctionPointerForDelegate(DelegateCache[35] = new IPropertyValue_Delegates.GetTimeSpanArray_35(Do_Abi_GetTimeSpanArray_35)).ToPointer(),
- _GetPointArray_36 = Marshal.GetFunctionPointerForDelegate(DelegateCache[36] = new IPropertyValue_Delegates.GetPointArray_36(Do_Abi_GetPointArray_36)).ToPointer(),
- _GetSizeArray_37 = Marshal.GetFunctionPointerForDelegate(DelegateCache[37] = new IPropertyValue_Delegates.GetSizeArray_37(Do_Abi_GetSizeArray_37)).ToPointer(),
- _GetRectArray_38 = Marshal.GetFunctionPointerForDelegate(DelegateCache[38] = new IPropertyValue_Delegates.GetRectArray_38(Do_Abi_GetRectArray_38)).ToPointer(),
-#else
- _get_Type_0 = (delegate*)&Do_Abi_get_Type_0,
- _get_IsNumericScalar_1 = (delegate*)&Do_Abi_get_IsNumericScalar_1,
- _GetUInt8_2 = (delegate*)&Do_Abi_GetUInt8_2,
- _GetInt16_3 = (delegate*