xref: /aosp_15_r20/external/cronet/base/win/patch_util.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2017 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef BASE_WIN_PATCH_UTIL_H_
6 #define BASE_WIN_PATCH_UTIL_H_
7 
8 #include <windows.h>
9 
10 #include "base/base_export.h"
11 
12 namespace base {
13 namespace win {
14 namespace internal {
15 
16 // Copies |length| bytes from |source| to |destination|, temporarily setting
17 // |destination| to writable. Returns a Windows error code or NO_ERROR if
18 // successful.
19 BASE_EXPORT DWORD ModifyCode(void* destination,
20                              const void* source,
21                              size_t length);
22 
23 }  // namespace internal
24 }  // namespace win
25 }  // namespace base
26 
27 #endif  // BASE_WIN_PATCH_UTIL_H_
28