1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/sandbox/win/src/named_pipe_interception.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,36 @@ 1.4 +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1.5 +// Use of this source code is governed by a BSD-style license that can be 1.6 +// found in the LICENSE file. 1.7 + 1.8 +#include "sandbox/win/src/nt_internals.h" 1.9 +#include "sandbox/win/src/sandbox_types.h" 1.10 + 1.11 +#ifndef SANDBOX_SRC_NAMED_PIPE_INTERCEPTION_H__ 1.12 +#define SANDBOX_SRC_NAMED_PIPE_INTERCEPTION_H__ 1.13 + 1.14 +namespace sandbox { 1.15 + 1.16 +extern "C" { 1.17 + 1.18 +typedef HANDLE (WINAPI *CreateNamedPipeWFunction) ( 1.19 + LPCWSTR lpName, 1.20 + DWORD dwOpenMode, 1.21 + DWORD dwPipeMode, 1.22 + DWORD nMaxInstances, 1.23 + DWORD nOutBufferSize, 1.24 + DWORD nInBufferSize, 1.25 + DWORD nDefaultTimeOut, 1.26 + LPSECURITY_ATTRIBUTES lpSecurityAttributes); 1.27 + 1.28 +// Interception of CreateNamedPipeW in kernel32.dll 1.29 +SANDBOX_INTERCEPT HANDLE WINAPI TargetCreateNamedPipeW( 1.30 + CreateNamedPipeWFunction orig_CreateNamedPipeW, LPCWSTR pipe_name, 1.31 + DWORD open_mode, DWORD pipe_mode, DWORD max_instance, DWORD out_buffer_size, 1.32 + DWORD in_buffer_size, DWORD default_timeout, 1.33 + LPSECURITY_ATTRIBUTES security_attributes); 1.34 + 1.35 +} // extern "C" 1.36 + 1.37 +} // namespace sandbox 1.38 + 1.39 +#endif // SANDBOX_SRC_NAMED_PIPE_INTERCEPTION_H__