patch_util.h 711 B

12345678910111213141516171819202122232425
  1. // Copyright 2017 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef BASE_WIN_PATCH_UTIL_H_
  5. #define BASE_WIN_PATCH_UTIL_H_
  6. #include <windows.h>
  7. #include "base/base_export.h"
  8. namespace base {
  9. namespace win {
  10. namespace internal {
  11. // Copies |length| bytes from |source| to |destination|, temporarily setting
  12. // |destination| to writable. Returns a Windows error code or NO_ERROR if
  13. // successful.
  14. BASE_EXPORT DWORD ModifyCode(void* destination, const void* source, int length);
  15. } // namespace internal
  16. } // namespace win
  17. } // namespace base
  18. #endif // BASE_WIN_PATCH_UTIL_H_