diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-03-19 12:26:03 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-03-19 12:26:03 +0000 |
commit | 83f4b0035ae3f89061af6dbf7937b933b6319b8e (patch) | |
tree | 604ceb029ea201301082bf710e0dce4a75eb5721 /bridges | |
parent | a5910a804a9befb615a07fb4e5d2ca0929ba2413 (diff) |
INTEGRATION: CWS sb15 (1.12.4); FILE MERGED
2004/03/12 14:16:08 dbo 1.12.4.2: #i25318# making bridge code snippets executable
2004/02/11 16:08:37 sb 1.12.4.1: #i24561# Added VtableFactory::flushCode.
Diffstat (limited to 'bridges')
-rw-r--r-- | bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx b/bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx index 8a2e66bae..bb5fc9f7a 100644 --- a/bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx +++ b/bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx @@ -2,9 +2,9 @@ * * $RCSfile: cpp2uno.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: hr $ $Date: 2004-02-03 12:46:18 $ + * last change: $Author: obo $ $Date: 2004-03-19 13:26:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -500,3 +500,15 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions( } return code; } + +void bridges::cpp_uno::shared::VtableFactory::flushCode( + unsigned char const * begin, unsigned char const * end) +{ + DWORD old_protect; +#if OSL_DEBUG_LEVEL > 0 + BOOL success = +#endif + VirtualProtect( const_cast<unsigned char *>(begin), end - begin, + PAGE_EXECUTE_READWRITE, &old_protect ); + OSL_ENSURE( success, "VirtualProtect() failed!" ); +} |