modperl branch collapsed back to MAIN trunk, man!
[www.jankratochvil.net.git] / project / captive / apiref / captive-apiref-mm.html
diff --git a/project/captive/apiref/captive-apiref-mm.html b/project/captive/apiref/captive-apiref-mm.html
new file mode 100644 (file)
index 0000000..88f3f0f
--- /dev/null
@@ -0,0 +1,85 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>mm</title><meta name="generator" content="DocBook XSL Stylesheets V1.58.1"><meta name="generator" content="GTK-Doc V1.1 (XML mode)"><style type="text/css">
+        .synopsis, .classsynopsis {
+            background: #eeeeee;
+            border: solid 1px #aaaaaa;
+            padding: 0.5em;
+        }
+        .programlisting {
+            background: #eeeeff;
+            border: solid 1px #aaaaff;
+            padding: 0.5em;
+        }
+        .variablelist {
+            padding: 4px;
+            margin-left: 3em;
+        }
+        .navigation {
+            background: #ffeeee;
+            border: solid 1px #ffaaaa;
+            margin-top: 0.5em;
+            margin-bottom: 0.5em;
+        }
+        .navigation a {
+            color: #770000;
+        }
+        .navigation a:visited {
+            color: #550000;
+        }
+        .navigation .title {
+            font-size: 200%;
+        }
+      </style><link rel="home" href="index.html" title="Operation Captive Reference Manual"><link rel="up" href="ch01.html" title="Operation Captive"><link rel="previous" href="captive-apiref-macros.html" title="macros"><link rel="next" href="captive-apiref-ps-reactos.html" title="ps_reactos"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="captive-apiref-macros.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">Operation Captive Reference Manual</th><td><a accesskey="n" href="captive-apiref-ps-reactos.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="captive-apiref-mm"></a><div class="titlepage"></div><div class="refnamediv"><h2>mm</h2><p>mm &#8212; </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
+
+
+
+gint        <a href="captive-apiref-mm.html#captive-flProtect-to-mmap-prot">captive_flProtect_to_mmap_prot</a>  (ULONG flProtect);
+gboolean    <a href="captive-apiref-mm.html#captive-mmap-map-new">captive_mmap_map_new</a>            (gconstpointer addr,
+                                             size_t len,
+                                             int mmap_prot);
+gint        <a href="captive-apiref-mm.html#captive-mmap-map-get">captive_mmap_map_get</a>            (gconstpointer addr);
+gboolean    <a href="captive-apiref-mm.html#captive-mmap-map-set">captive_mmap_map_set</a>            (gconstpointer addr,
+                                             int mmap_prot);
+</pre></div><div class="refsect1" lang="en"><h2>Description</h2><p>
+
+</p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="captive-flProtect-to-mmap-prot"></a>captive_flProtect_to_mmap_prot ()</h3><pre class="programlisting">gint        captive_flProtect_to_mmap_prot  (ULONG flProtect);</pre><p>
+Map reactos flProtect to mprotect(2)-compatible &quot;prot&quot; argument.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>flProtect</tt></i> :</span></td><td> reactos compatible constant such as <tt>PAGE_READWRITE</tt>.
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> mmap(2) compatible <i><tt>prot</tt></i> argument.
+</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="captive-mmap-map-new"></a>captive_mmap_map_new ()</h3><pre class="programlisting">gboolean    captive_mmap_map_new            (gconstpointer addr,
+                                             size_t len,
+                                             int mmap_prot);</pre><p>
+Initialize the protection map for the specified memory block.
+Any existing protections in the specified block are forbidden.
+</p><p>
+This function does not do any mprotect(2) style, it just stores
+the settings for the later <tt>OR</tt> operations by MmSetPageProtect().
+Caller is responsibel to set the same protections as the given <i><tt>mmap_prot</tt></i>.</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>addr</tt></i> :</span></td><td> <tt>PAGE_SIZE</tt> aligned address of memory block.
+<tt>NULL</tt> value is forbidden.
+</td></tr><tr><td><span class="term"><i><tt>len</tt></i> :</span></td><td> <tt>PAGE_SIZE</tt> aligned  length of memory block.
+Value <tt>0</tt> is permitted. Value <tt>-1</tt> is forbidden.
+</td></tr><tr><td><span class="term"><i><tt>mmap_prot</tt></i> :</span></td><td> Protections for the memory block as specified by <i><tt>prot</tt></i> of mprotect(2).
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <tt>TRUE</tt> if the protection storage was successful.
+</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="captive-mmap-map-get"></a>captive_mmap_map_get ()</h3><pre class="programlisting">gint        captive_mmap_map_get            (gconstpointer addr);</pre><p>
+Query the protection settings at <i><tt>addr</tt></i> address.
+The given <i><tt>addr</tt></i> block of <tt>PAGE_SIZE</tt> must be already initialized
+by <a href="captive-apiref-mm.html#captive-mmap-map-new">captive_mmap_map_new</a>().</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>addr</tt></i> :</span></td><td> <tt>PAGE_SIZE</tt> aligned address of memory block.
+<tt>NULL</tt> value is forbidden.
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> Protections of the page as specified by <i><tt>prot</tt></i> of mprotect(2)
+if successful. Value <tt>-1</tt> if failed.
+</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="captive-mmap-map-set"></a>captive_mmap_map_set ()</h3><pre class="programlisting">gboolean    captive_mmap_map_set            (gconstpointer addr,
+                                             int mmap_prot);</pre><p>
+Set the protection settings at <i><tt>addr</tt></i> address.
+The given <i><tt>addr</tt></i> block of <tt>PAGE_SIZE</tt> must be already initialized
+by <a href="captive-apiref-mm.html#captive-mmap-map-new">captive_mmap_map_new</a>().</p><p>
+
+</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>addr</tt></i> :</span></td><td> <tt>PAGE_SIZE</tt> aligned address of memory block.
+<tt>NULL</tt> value is forbidden.
+</td></tr><tr><td><span class="term"><i><tt>mmap_prot</tt></i> :</span></td><td> Protections for the memory block as specified by <i><tt>prot</tt></i> of mprotect(2).
+</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <tt>TRUE</tt> if the protections were successfuly set.
+</td></tr></tbody></table></div></div></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="captive-apiref-macros.html"><b>&lt;&lt; macros</b></a></td><td align="right"><a accesskey="n" href="captive-apiref-ps-reactos.html"><b>ps_reactos &gt;&gt;</b></a></td></tr></table></body></html>