summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-03-19 12:26:03 +0000
committerOliver Bolte <obo@openoffice.org>2004-03-19 12:26:03 +0000
commit71fed56e7d67015af14209076f7b09303595bcbc (patch)
tree73528beb9c4216bd05ba2d79735dc236f3139095 /bridges
parentd764ce59da90198eeaefcb18d8735e4ec370f008 (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.cxx16
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 f6a2f7d8ff6a..195d91ca8e56 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!" );
+}