1//
2// Copyright (c) Microsoft. All rights reserved.
3// Licensed under the MIT license. See LICENSE file in the project root for full license information.
4//
5
6#include "standardpch.h"
7#include "ieememorymanager.h"
8#include "superpmi-shim-collector.h"
9
10//***************************************************************************
11// IUnknown methods
12//***************************************************************************
13HRESULT STDMETHODCALLTYPE interceptor_IEEMM::QueryInterface(REFIID id, void** pInterface)
14{
15 return original_IEEMM->QueryInterface(id, pInterface);
16}
17ULONG STDMETHODCALLTYPE interceptor_IEEMM::AddRef()
18{
19 return original_IEEMM->AddRef();
20}
21ULONG STDMETHODCALLTYPE interceptor_IEEMM::Release()
22{
23 return original_IEEMM->Release();
24}
25
26//***************************************************************************
27// IEEMemoryManager methods for locking
28//***************************************************************************
29LPVOID STDMETHODCALLTYPE interceptor_IEEMM::ClrVirtualAlloc(LPVOID lpAddress,
30 SIZE_T dwSize,
31 DWORD flAllocationType,
32 DWORD flProtect)
33{
34 return original_IEEMM->ClrVirtualAlloc(lpAddress, dwSize, flAllocationType, flProtect);
35}
36BOOL STDMETHODCALLTYPE interceptor_IEEMM::ClrVirtualFree(LPVOID lpAddress, SIZE_T dwSize, DWORD dwFreeType)
37{
38 return original_IEEMM->ClrVirtualFree(lpAddress, dwSize, dwFreeType);
39}
40SIZE_T STDMETHODCALLTYPE interceptor_IEEMM::ClrVirtualQuery(LPCVOID lpAddress,
41 PMEMORY_BASIC_INFORMATION lpBuffer,
42 SIZE_T dwLength)
43{
44 return original_IEEMM->ClrVirtualQuery(lpAddress, lpBuffer, dwLength);
45}
46BOOL STDMETHODCALLTYPE interceptor_IEEMM::ClrVirtualProtect(LPVOID lpAddress,
47 SIZE_T dwSize,
48 DWORD flNewProtect,
49 PDWORD lpflOldProtect)
50{
51 return original_IEEMM->ClrVirtualProtect(lpAddress, dwSize, flNewProtect, lpflOldProtect);
52}
53HANDLE STDMETHODCALLTYPE interceptor_IEEMM::ClrGetProcessHeap()
54{
55 return original_IEEMM->ClrGetProcessHeap();
56}
57HANDLE STDMETHODCALLTYPE interceptor_IEEMM::ClrHeapCreate(DWORD flOptions, SIZE_T dwInitialSize, SIZE_T dwMaximumSize)
58{
59 return original_IEEMM->ClrHeapCreate(flOptions, dwInitialSize, dwMaximumSize);
60}
61BOOL STDMETHODCALLTYPE interceptor_IEEMM::ClrHeapDestroy(HANDLE hHeap)
62{
63 return original_IEEMM->ClrHeapDestroy(hHeap);
64}
65LPVOID STDMETHODCALLTYPE interceptor_IEEMM::ClrHeapAlloc(HANDLE hHeap, DWORD dwFlags, SIZE_T dwBytes)
66{
67 return original_IEEMM->ClrHeapAlloc(hHeap, dwFlags, dwBytes);
68}
69BOOL STDMETHODCALLTYPE interceptor_IEEMM::ClrHeapFree(HANDLE hHeap, DWORD dwFlags, LPVOID lpMem)
70{
71 return original_IEEMM->ClrHeapFree(hHeap, dwFlags, lpMem);
72}
73BOOL STDMETHODCALLTYPE interceptor_IEEMM::ClrHeapValidate(HANDLE hHeap, DWORD dwFlags, LPCVOID lpMem)
74{
75 return original_IEEMM->ClrHeapValidate(hHeap, dwFlags, lpMem);
76}
77HANDLE STDMETHODCALLTYPE interceptor_IEEMM::ClrGetProcessExecutableHeap()
78{
79 return original_IEEMM->ClrGetProcessExecutableHeap();
80}
81