michael@0: // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. michael@0: // Use of this source code is governed by a BSD-style license that can be michael@0: // found in the LICENSE file. michael@0: michael@0: #include "sandbox/win/src/nt_internals.h" michael@0: #include "sandbox/win/src/sandbox_types.h" michael@0: michael@0: #ifndef SANDBOX_SRC_TARGET_INTERCEPTIONS_H__ michael@0: #define SANDBOX_SRC_TARGET_INTERCEPTIONS_H__ michael@0: michael@0: namespace sandbox { michael@0: michael@0: extern "C" { michael@0: michael@0: // Interception of NtMapViewOfSection on the child process. michael@0: // It should never be called directly. This function provides the means to michael@0: // detect dlls being loaded, so we can patch them if needed. michael@0: SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtMapViewOfSection( michael@0: NtMapViewOfSectionFunction orig_MapViewOfSection, HANDLE section, michael@0: HANDLE process, PVOID *base, ULONG_PTR zero_bits, SIZE_T commit_size, michael@0: PLARGE_INTEGER offset, PSIZE_T view_size, SECTION_INHERIT inherit, michael@0: ULONG allocation_type, ULONG protect); michael@0: michael@0: // Interception of NtUnmapViewOfSection on the child process. michael@0: // It should never be called directly. This function provides the means to michael@0: // detect dlls being unloaded, so we can clean up our interceptions. michael@0: SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtUnmapViewOfSection( michael@0: NtUnmapViewOfSectionFunction orig_UnmapViewOfSection, HANDLE process, michael@0: PVOID base); michael@0: michael@0: } // extern "C" michael@0: michael@0: } // namespace sandbox michael@0: michael@0: #endif // SANDBOX_SRC_TARGET_INTERCEPTIONS_H__