1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
5 using System.Runtime.CompilerServices;
6 using System.Runtime.ConstrainedExecution;
7 using System.Runtime.Versioning;
9 using System.Threading;
12 namespace System.Runtime.InteropServices.WindowsRuntime
15 /// Exposes a helper method that allows <code>WindowsRuntimeBuffer : IBuffer, IBufferInternal</code> which is implemented in
16 /// <code>System.Runtime.WindowsRuntime.dll</code> to call into the VM.
19 internal static class WindowsRuntimeBufferHelper
21 [DllImport(JitHelpers.QCall)]
22 private unsafe extern static void StoreOverlappedPtrInCCW(ObjectHandleOnStack windowsRuntimeBuffer, NativeOverlapped* overlapped);
26 internal unsafe static void StoreOverlappedInCCW(Object windowsRuntimeBuffer, NativeOverlapped* overlapped)
28 StoreOverlappedPtrInCCW(JitHelpers.GetObjectHandleOnStack(ref windowsRuntimeBuffer), overlapped);
30 } // class WindowsRuntimeBufferHelper
33 // WindowsRuntimeBufferHelper.cs