summaryrefslogtreecommitdiff
path: root/src/md/datasource/api.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/md/datasource/api.cpp')
-rw-r--r--src/md/datasource/api.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/md/datasource/api.cpp b/src/md/datasource/api.cpp
new file mode 100644
index 0000000000..a3112deaea
--- /dev/null
+++ b/src/md/datasource/api.cpp
@@ -0,0 +1,31 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+//*****************************************************************************
+// api.cpp
+//
+
+//
+//*****************************************************************************
+
+#include "stdafx.h"
+#include "remotemdinternalrwsource.h"
+
+HRESULT CreateRemoteMDInternalRWSource(TADDR mdInternalRWRemoteAddress, ICorDebugDataTarget* pDataTarget, DWORD defines, DWORD dataStructureVersion, IMDCustomDataSource** ppDataSource)
+{
+ HRESULT hr = S_OK;
+ RemoteMDInternalRWSource* pSource = new (nothrow) RemoteMDInternalRWSource();
+ if (pSource == NULL)
+ return E_OUTOFMEMORY;
+
+ hr = pSource->InitFromTarget(mdInternalRWRemoteAddress, pDataTarget, defines, dataStructureVersion);
+ if (SUCCEEDED(hr))
+ {
+ hr = pSource->QueryInterface(IID_IMDCustomDataSource, (void**)ppDataSource);
+ }
+ if (FAILED(hr))
+ {
+ delete pSource;
+ }
+ return hr;
+}