patch_util.h 747 B

123456789101112131415161718192021222324252627
  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,
  15. const void* source,
  16. size_t length);
  17. } // namespace internal
  18. } // namespace win
  19. } // namespace base
  20. #endif // BASE_WIN_PATCH_UTIL_H_