Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuqun Lou <luqunl@microsoft.com>2017-10-18 01:01:29 +0300
committerLuqun Lou <luqunl@microsoft.com>2017-10-18 01:01:29 +0300
commit509507f81c4c04a30d7b75a676a60b7fac10cec1 (patch)
treefb0b51a78b0a823dba9bb2549dca56e526834d50 /src/System.Private.Interop
parent228f8bee5ba74803d30bbd243508fbe8d02f861d (diff)
MiniWinRT need IMarshal/IStream support
the reason to change Clone signature from "out IntPtr" to "IntPtr" is that "our IntPtr" needs marshal support and "Intptr" doesn't need marshal support. For NativeCallable method, it shouldn't need marshal support. [tfs-changeset: 1678334]
Diffstat (limited to 'src/System.Private.Interop')
-rw-r--r--src/System.Private.Interop/src/Shared/McgIntrinsics.cs2
-rw-r--r--src/System.Private.Interop/src/Shared/StandardInterfaces.cs6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/System.Private.Interop/src/Shared/McgIntrinsics.cs b/src/System.Private.Interop/src/Shared/McgIntrinsics.cs
index 1162dca06..a5c271a8f 100644
--- a/src/System.Private.Interop/src/Shared/McgIntrinsics.cs
+++ b/src/System.Private.Interop/src/Shared/McgIntrinsics.cs
@@ -608,7 +608,7 @@ namespace System.Runtime.InteropServices
IntPtr puArgErr);
// IStream
- internal delegate int AddrOfIStreamClone(IntPtr pComThis, out IntPtr ppstm);
+ internal delegate int AddrOfIStreamClone(IntPtr pComThis, IntPtr ppstm);
internal delegate int AddrOfIStreamCopyTo(IntPtr pComThis, IntPtr pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten);
internal delegate int AddrOfIStreamLockRegion(IntPtr pComThis, long libOffset, long cb, int dwLockType);
internal delegate int AddrOfIStreamRead(IntPtr pComThis, IntPtr pv, int cb, IntPtr pcbRead);
diff --git a/src/System.Private.Interop/src/Shared/StandardInterfaces.cs b/src/System.Private.Interop/src/Shared/StandardInterfaces.cs
index 0c36184dd..24c04ecce 100644
--- a/src/System.Private.Interop/src/Shared/StandardInterfaces.cs
+++ b/src/System.Private.Interop/src/Shared/StandardInterfaces.cs
@@ -1579,7 +1579,7 @@ namespace System.Runtime.InteropServices
static unsafe int GetIMarshal(void **ppIMarshal)
{
-#if ENABLE_WINRT
+#if ENABLE_MIN_WINRT
void *pUnk = null;
int hr = ExternalInterop.CoCreateFreeThreadedMarshaler(null, (void **)&pUnk);
if (hr < 0) return hr;
@@ -1801,7 +1801,7 @@ namespace System.Runtime.InteropServices
/// <returns>The IStream*</returns>
internal static unsafe IntPtr CreateMemStm(ulong lSize)
{
-#if ENABLE_WINRT
+#if ENABLE_MIN_WINRT
__com_IStream* pIStream = (__com_IStream*)PInvokeMarshal.CoTaskMemAlloc(new UIntPtr((uint)sizeof(__com_IStream)));
pIStream->pVtable = (__vtable_IStream*)__vtable_IStream.GetVtable();
pIStream->m_cbCurrent = 0;
@@ -2077,7 +2077,7 @@ namespace System.Runtime.InteropServices
#region Rest of IStream overrides that are not implemented
[NativeCallable]
- internal static int Clone(System.IntPtr pComThis, out IntPtr ppstm)
+ internal static int Clone(System.IntPtr pComThis, IntPtr ppstm)
{
ppstm = default(IntPtr);
return Interop.COM.E_NOTIMPL;