Skip to content

Commit

Permalink
[DO NOT MERGE] Restore "Update to .NET 5 Preview 8 and update compile…
Browse files Browse the repository at this point in the history
…r toolset package" (#400)

* Revert "Revert "Update to .NET 5 Preview 8 and update compiler toolset package (#388)" (#399)"

This reverts commit 598ec08.

* fixed a number of build/test issues

* Use VS 16.8 Build Tools if necessary

* check nuget

* cswinrt_build_only

* requirements
  • Loading branch information
Scottj1s authored Sep 15, 2020
1 parent f8637d1 commit 9190ef4
Show file tree
Hide file tree
Showing 37 changed files with 963 additions and 811 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ global.json
.nuget
.nupkg
nuget/Microsoft.Windows.CsWinRT.Prerelease.targets
*.binlog
vs_buildtools.exe
.buildtools
6 changes: 0 additions & 6 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@
<IntDir>$([MSBuild]::NormalizeDirectory('$(BuildOutDir)', '$(MSBuildProjectName)', 'obj'))</IntDir>
</PropertyGroup>

<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
<TargetPlatformIdentifier>Windows</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
<LinkIncremental>true</LinkIncremental>
Expand All @@ -66,7 +61,6 @@
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PreprocessorDefinitions>VERSION_NUMBER="$(VersionNumber)";VERSION_STRING="$(VersionString)";NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions>
</ClCompile>
<ClCompile Condition="'$(Configuration)'=='Debug'">
Expand Down
7 changes: 6 additions & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -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;
</RestoreSources>
</PropertyGroup>

<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="3.7.0" />
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="3.8.0-3.20428.4" />
</ItemGroup>

<ItemGroup>
<FrameworkReference Remove="Microsoft.Windows.SDK.NET.Ref" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Projections/WinUI/WinUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<ProjectReference Include="..\..\cswinrt\cswinrt.vcxproj" />
<ProjectReference Include="..\Windows\Windows.csproj" />
<PackageReference Include="Microsoft.WinUI" Version="[$(MicrosoftWinUIVersion)]" GeneratePathProperty="true">
<ExcludeAssets>compile; build; runtime</ExcludeAssets>
<ExcludeAssets>build; buildtransitive; compile; runtime</ExcludeAssets>
</PackageReference>
</ItemGroup>

Expand Down
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: <http://aka.ms/cswinrt/nuget>

Please see [usage](USAGE.md) for details on running the C#/WinRT tool. For additional documentation visit <http://aka.ms/cswinrt>.
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.
Expand All @@ -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 <http://aka.ms/cswinrt>.

## Related Projects

Expand Down
17 changes: 3 additions & 14 deletions UnitTest/UnitTest.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<!--Target .NET Core 2.0 to ensure .NET Standard 2.0 compatibility-->
<!--Target .NET Core 2.0 to test .NET Standard 2.0 projection -->
<TargetFrameworks>netcoreapp2.0;net5.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<Platforms>AnyCPU;x64;x86</Platforms>
Expand All @@ -10,8 +10,6 @@
<LangVersion>8</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>1701;1702;0436;1658</NoWarn>
<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
<AssetTargetFallback>netcoreapp5.0</AssetTargetFallback>
</PropertyGroup>

<ItemGroup>
Expand All @@ -20,26 +18,17 @@
<ProjectReference Include="..\Projections\Test\Test.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="Microsoft.VCRTForwarders.140" Version="1.0.6" />
<PackageReference Include="System.Collections" Version="4.3.0" />
<PackageReference Include="System.Diagnostics.Debug" Version="4.3.0" />
<PackageReference Include="System.IO" Version="4.3.0" />
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
<PackageReference Include="System.Runtime.Handles" Version="4.3.0" />
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
<PackageReference Include="System.Text.Encoding" Version="4.3.0" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Include="System.Threading.Tasks" Version="4.3.0" />
<PackageReference Include="System.Memory" Version="4.5.4" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.console" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="XunitXml.TestLogger" Version="2.1.26" />
<PackageReference Include="System.Memory" Version="4.5.4" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
Expand Down
7 changes: 7 additions & 0 deletions WinRT.Host/WinRT.Host.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,13 @@
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<!-- Temporarily disable LinkTimeCodeGen to work around incompatibility of VS16.7-built libnethost.lib and VS16.8-built winrt.host:
LINK : fatal error C1047: The object or library file ...libnethost.lib was created by a different version of the compiler than other objects like dllmain.obj... -->
<AdditionalOptions>/GL- %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="hostfxr_status.h" />
<ClInclude Include="pch.h" />
Expand Down
6 changes: 3 additions & 3 deletions WinRT.Runtime/ComWrappersSupport.net5.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ static unsafe DefaultComWrappers()
IUnknownVftblPtr = RuntimeHelpers.AllocateTypeAssociatedMemory(typeof(IUnknownVftbl), sizeof(IUnknownVftbl));
(*(IUnknownVftbl*)IUnknownVftblPtr) = new IUnknownVftbl
{
QueryInterface = (delegate* stdcall<IntPtr, ref Guid, out IntPtr, int>)qi,
AddRef = (delegate* stdcall<IntPtr, uint>)addRef,
Release = (delegate* stdcall<IntPtr, uint>)release,
QueryInterface = (delegate* unmanaged[Stdcall]<IntPtr, ref Guid, out IntPtr, int>)qi,
AddRef = (delegate* unmanaged[Stdcall]<IntPtr, uint>)addRef,
Release = (delegate* unmanaged[Stdcall]<IntPtr, uint>)release,
};
}

Expand Down
6 changes: 3 additions & 3 deletions WinRT.Runtime/ComWrappersSupport.netstandard2.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ static unsafe ComWrappersSupport()
IUnknownVftblPtr = Marshal.AllocHGlobal(sizeof(IUnknownVftbl));
(*(IUnknownVftbl*)IUnknownVftblPtr) = new IUnknownVftbl
{
QueryInterface = (delegate* stdcall<IntPtr, ref Guid, out IntPtr, int>)Marshal.GetFunctionPointerForDelegate(Abi_QueryInterface),
AddRef = (delegate* stdcall<IntPtr, uint>)Marshal.GetFunctionPointerForDelegate(Abi_AddRef),
Release = (delegate* stdcall<IntPtr, uint>)Marshal.GetFunctionPointerForDelegate(Abi_Release),
QueryInterface = (delegate* unmanaged[Stdcall]<IntPtr, ref Guid, out IntPtr, int>)Marshal.GetFunctionPointerForDelegate(Abi_QueryInterface),
AddRef = (delegate* unmanaged[Stdcall]<IntPtr, uint>)Marshal.GetFunctionPointerForDelegate(Abi_AddRef),
Release = (delegate* unmanaged[Stdcall]<IntPtr, uint>)Marshal.GetFunctionPointerForDelegate(Abi_Release),
};
}

Expand Down
6 changes: 3 additions & 3 deletions WinRT.Runtime/IInspectable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ public unsafe struct Vftbl
{
public IUnknownVftbl IUnknownVftbl;
private void* _GetIids;
public delegate* stdcall<IntPtr, int*, IntPtr*, int> GetIids { get => (delegate* stdcall<IntPtr, int*, IntPtr*, int>)_GetIids; set => _GetIids = (void*)value; }
public delegate* unmanaged[Stdcall]<IntPtr, int*, IntPtr*, int> GetIids { get => (delegate* unmanaged[Stdcall]<IntPtr, int*, IntPtr*, int>)_GetIids; set => _GetIids = (void*)value; }

private void* _GetRuntimeClassName;
public delegate* stdcall<IntPtr, IntPtr*, int> GetRuntimeClassName { get => (delegate* stdcall<IntPtr, IntPtr*, int>)_GetRuntimeClassName; set => _GetRuntimeClassName = (void*)value; }
public delegate* unmanaged[Stdcall]<IntPtr, IntPtr*, int> GetRuntimeClassName { get => (delegate* unmanaged[Stdcall]<IntPtr, IntPtr*, int>)_GetRuntimeClassName; set => _GetRuntimeClassName = (void*)value; }

private void* _GetTrustLevel;
public delegate* stdcall<IntPtr, TrustLevel*, int> GetTrustLevel { get => (delegate* stdcall<IntPtr, TrustLevel*, int>)_GetTrustLevel; set => _GetTrustLevel = (void*)value; }
public delegate* unmanaged[Stdcall]<IntPtr, TrustLevel*, int> GetTrustLevel { get => (delegate* unmanaged[Stdcall]<IntPtr, TrustLevel*, int>)_GetTrustLevel; set => _GetTrustLevel = (void*)value; }

public static readonly Vftbl AbiToProjectionVftable;
public static readonly IntPtr AbiToProjectionVftablePtr;
Expand Down
18 changes: 9 additions & 9 deletions WinRT.Runtime/Interop/ExceptionErrorInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ public struct Vftbl
{
internal global::WinRT.Interop.IUnknownVftbl IUnknownVftbl;
private void* _GetGuid_0;
public delegate* stdcall<IntPtr, Guid*, int> GetGuid_0 { get => (delegate* stdcall<IntPtr, Guid*, int>)_GetGuid_0; set => _GetGuid_0 = value; }
public delegate* unmanaged[Stdcall]<IntPtr, Guid*, int> GetGuid_0 { get => (delegate* unmanaged[Stdcall]<IntPtr, Guid*, int>)_GetGuid_0; set => _GetGuid_0 = value; }
private void* _GetSource_1;
public delegate* stdcall<IntPtr, IntPtr*, int> GetSource_1 { get => (delegate* stdcall<IntPtr, IntPtr*, int>)_GetSource_1; set => _GetSource_1 = value; }
public delegate* unmanaged[Stdcall]<IntPtr, IntPtr*, int> GetSource_1 { get => (delegate* unmanaged[Stdcall]<IntPtr, IntPtr*, int>)_GetSource_1; set => _GetSource_1 = value; }
private void* _GetDescription_2;
public delegate* stdcall<IntPtr, IntPtr*, int> GetDescription_2 { get => (delegate* stdcall<IntPtr, IntPtr*, int>)_GetDescription_2; set => _GetDescription_2 = value; }
public delegate* unmanaged[Stdcall]<IntPtr, IntPtr*, int> GetDescription_2 { get => (delegate* unmanaged[Stdcall]<IntPtr, IntPtr*, int>)_GetDescription_2; set => _GetDescription_2 = value; }
private void* _GetHelpFile_3;
public delegate* stdcall<IntPtr, IntPtr*, int> GetHelpFile_3 { get => (delegate* stdcall<IntPtr, IntPtr*, int>)_GetHelpFile_3; set => _GetHelpFile_3 = value; }
public delegate* unmanaged[Stdcall]<IntPtr, IntPtr*, int> GetHelpFile_3 { get => (delegate* unmanaged[Stdcall]<IntPtr, IntPtr*, int>)_GetHelpFile_3; set => _GetHelpFile_3 = value; }
private void* _GetHelpFileContent_4;
public delegate* stdcall<IntPtr, IntPtr*, int> GetHelpFileContent_4 { get => (delegate* stdcall<IntPtr, IntPtr*, int>)_GetHelpFileContent_4; set => _GetHelpFileContent_4 = value; }
public delegate* unmanaged[Stdcall]<IntPtr, IntPtr*, int> GetHelpFileContent_4 { get => (delegate* unmanaged[Stdcall]<IntPtr, IntPtr*, int>)_GetHelpFileContent_4; set => _GetHelpFileContent_4 = value; }

private static readonly Vftbl AbiToProjectionVftable;
public static readonly IntPtr AbiToProjectionVftablePtr;
Expand Down Expand Up @@ -325,7 +325,7 @@ public struct Vftbl
{
internal global::WinRT.Interop.IUnknownVftbl IUnknownVftbl;
private void* _GetLanguageException_0;
public delegate* stdcall<IntPtr, IntPtr*, int> GetLanguageException_0 => (delegate* stdcall<IntPtr, IntPtr*, int>)_GetLanguageException_0;
public delegate* unmanaged[Stdcall]<IntPtr, IntPtr*, int> GetLanguageException_0 => (delegate* unmanaged[Stdcall]<IntPtr, IntPtr*, int>)_GetLanguageException_0;
}

public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr);
Expand Down Expand Up @@ -369,7 +369,7 @@ public struct Vftbl
{
internal global::WinRT.Interop.IUnknownVftbl IUnknownVftbl;
private void* _InterfaceSupportsErrorInfo_0;
public delegate* stdcall<IntPtr, Guid*, int> InterfaceSupportsErrorInfo_0 { get => (delegate* stdcall<IntPtr, Guid*, int>)_InterfaceSupportsErrorInfo_0; set => _InterfaceSupportsErrorInfo_0 = value; }
public delegate* unmanaged[Stdcall]<IntPtr, Guid*, int> InterfaceSupportsErrorInfo_0 { get => (delegate* unmanaged[Stdcall]<IntPtr, Guid*, int>)_InterfaceSupportsErrorInfo_0; set => _InterfaceSupportsErrorInfo_0 = value; }

private static readonly Vftbl AbiToProjectionVftable;
public static readonly IntPtr AbiToProjectionVftablePtr;
Expand Down Expand Up @@ -440,9 +440,9 @@ public struct Vftbl

internal global::WinRT.Interop.IUnknownVftbl unknownVftbl;
private void* _GetErrorDetails_0;
public delegate* stdcall<IntPtr, IntPtr*, int*, IntPtr*, IntPtr*, int> GetErrorDetails_0 => (delegate* stdcall<IntPtr, IntPtr*, int*, IntPtr*, IntPtr*, int>)_GetErrorDetails_0;
public delegate* unmanaged[Stdcall]<IntPtr, IntPtr*, int*, IntPtr*, IntPtr*, int> GetErrorDetails_0 => (delegate* unmanaged[Stdcall]<IntPtr, IntPtr*, int*, IntPtr*, IntPtr*, int>)_GetErrorDetails_0;
private void* _GetReference_1;
public delegate* stdcall<IntPtr, IntPtr*, int> GetReference_1 => (delegate* stdcall<IntPtr, IntPtr*, int>)_GetReference_1;
public delegate* unmanaged[Stdcall]<IntPtr, IntPtr*, int> GetReference_1 => (delegate* unmanaged[Stdcall]<IntPtr, IntPtr*, int>)_GetReference_1;
}

public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr);
Expand Down
8 changes: 4 additions & 4 deletions WinRT.Runtime/Interop/IAgileReference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public struct Vftbl
{
public global::WinRT.Interop.IUnknownVftbl IUnknownVftbl;
private void* _Resolve;
public delegate* stdcall<IntPtr, ref Guid, out IntPtr, int> Resolve { get => (delegate* stdcall<IntPtr, ref Guid, out IntPtr, int>)_Resolve; set => _Resolve = value; }
public delegate* unmanaged[Stdcall]<IntPtr, ref Guid, out IntPtr, int> Resolve { get => (delegate* unmanaged[Stdcall]<IntPtr, ref Guid, out IntPtr, int>)_Resolve; set => _Resolve = value; }

public static readonly Vftbl AbiToProjectionVftable;
public static readonly IntPtr AbiToProjectionVftablePtr;
Expand Down Expand Up @@ -163,11 +163,11 @@ public struct Vftbl
{
public global::WinRT.Interop.IUnknownVftbl IUnknownVftbl;
private void* _RegisterInterfaceInGlobal;
public delegate* stdcall<IntPtr, IntPtr, ref Guid, out IntPtr, int> RegisterInterfaceInGlobal => (delegate* stdcall<IntPtr, IntPtr, ref Guid, out IntPtr, int>)_RegisterInterfaceInGlobal;
public delegate* unmanaged[Stdcall]<IntPtr, IntPtr, ref Guid, out IntPtr, int> RegisterInterfaceInGlobal => (delegate* unmanaged[Stdcall]<IntPtr, IntPtr, ref Guid, out IntPtr, int>)_RegisterInterfaceInGlobal;
private void* _RevokeInterfaceFromGlobal;
public delegate* stdcall<IntPtr, IntPtr, int> RevokeInterfaceFromGlobal => (delegate* stdcall<IntPtr, IntPtr, int>)_RevokeInterfaceFromGlobal;
public delegate* unmanaged[Stdcall]<IntPtr, IntPtr, int> RevokeInterfaceFromGlobal => (delegate* unmanaged[Stdcall]<IntPtr, IntPtr, int>)_RevokeInterfaceFromGlobal;
private void* _GetInterfaceFromGlobal;
public delegate* stdcall<IntPtr, IntPtr, ref Guid, out IntPtr, int> GetInterfaceFromGlobal => (delegate* stdcall<IntPtr, IntPtr, ref Guid, out IntPtr, int>)_GetInterfaceFromGlobal;
public delegate* unmanaged[Stdcall]<IntPtr, IntPtr, ref Guid, out IntPtr, int> GetInterfaceFromGlobal => (delegate* unmanaged[Stdcall]<IntPtr, IntPtr, ref Guid, out IntPtr, int>)_GetInterfaceFromGlobal;
}

public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr);
Expand Down
14 changes: 7 additions & 7 deletions WinRT.Runtime/Interop/IContextCallback.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public struct Vftbl
{
global::WinRT.Interop.IUnknownVftbl IUnknownVftbl;
private void* _ContextCallback;
public delegate* stdcall<IntPtr, IntPtr, ComCallData*, Guid*, int, IntPtr, int> ContextCallback_4
{
get => (delegate* stdcall<IntPtr, IntPtr, ComCallData*, Guid*, int, IntPtr, int>)_ContextCallback;
set => _ContextCallback = (void*)value;
public delegate* unmanaged[Stdcall]<IntPtr, IntPtr, ComCallData*, Guid*, int, IntPtr, int> ContextCallback_4
{
get => (delegate* unmanaged[Stdcall]<IntPtr, IntPtr, ComCallData*, Guid*, int, IntPtr, int>)_ContextCallback;
set => _ContextCallback = (void*)value;
}
}
public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr);
Expand Down Expand Up @@ -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);
}
}
Expand Down
Loading

0 comments on commit 9190ef4

Please sign in to comment.