Move debugger attributes to shared partition (#15100)
[platform/upstream/coreclr.git] / src / mscorlib / src / System / Runtime / InteropServices / WindowsRuntime / WindowsRuntimeBufferHelper.cs
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.
4
5 using System.Runtime.CompilerServices;
6 using System.Runtime.ConstrainedExecution;
7 using System.Runtime.Versioning;
8 using System.Security;
9 using System.Threading;
10
11
12 namespace System.Runtime.InteropServices.WindowsRuntime
13 {
14     /// <summary>
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.
17     /// </summary>
18     [FriendAccessAllowed]
19     internal static class WindowsRuntimeBufferHelper
20     {
21         [DllImport(JitHelpers.QCall)]
22         private unsafe extern static void StoreOverlappedPtrInCCW(ObjectHandleOnStack windowsRuntimeBuffer, NativeOverlapped* overlapped);
23
24
25         [FriendAccessAllowed]
26         internal unsafe static void StoreOverlappedInCCW(Object windowsRuntimeBuffer, NativeOverlapped* overlapped)
27         {
28             StoreOverlappedPtrInCCW(JitHelpers.GetObjectHandleOnStack(ref windowsRuntimeBuffer), overlapped);
29         }
30     }  // class WindowsRuntimeBufferHelper
31 }  // namespace
32
33 // WindowsRuntimeBufferHelper.cs