modperl bootstrap
[www.jankratochvil.net.git] / project / captive / apiref / captive-apiref-ldr-exports.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ldr_exports</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">
3         .synopsis, .classsynopsis {
4             background: #eeeeee;
5             border: solid 1px #aaaaaa;
6             padding: 0.5em;
7         }
8         .programlisting {
9             background: #eeeeff;
10             border: solid 1px #aaaaff;
11             padding: 0.5em;
12         }
13         .variablelist {
14             padding: 4px;
15             margin-left: 3em;
16         }
17         .navigation {
18             background: #ffeeee;
19             border: solid 1px #ffaaaa;
20             margin-top: 0.5em;
21             margin-bottom: 0.5em;
22         }
23         .navigation a {
24             color: #770000;
25         }
26         .navigation a:visited {
27             color: #550000;
28         }
29         .navigation .title {
30             font-size: 200%;
31         }
32       </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-storage.html" title="storage"><link rel="next" href="captive-apiref-calltype-reactos.html" title="calltype_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-storage.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-calltype-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-ldr-exports"></a><div class="titlepage"></div><div class="refnamediv"><h2>ldr_exports</h2><p>ldr_exports &#8212; </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
33
34
35
36 gboolean    <a href="captive-apiref-ldr-exports.html#captive-kernel-exports">captive_kernel_exports</a>          (void);
37 gboolean    <a href="captive-apiref-ldr-exports.html#captive-kernel-patches">captive_kernel_patches</a>          (void);
38 gboolean    <a href="captive-apiref-ldr-exports.html#captive-ModuleList-add-builtin">captive_ModuleList_add_builtin</a>  (const gchar *FullName_utf8,
39                                              ...);
40 gboolean    <a href="captive-apiref-ldr-exports.html#captive-ModuleList-patch">captive_ModuleList_patch</a>        (const gchar *FullName_utf8,
41                                              ...);
42 </pre></div><div class="refsect1" lang="en"><h2>Description</h2><p>
43
44 </p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="captive-kernel-exports"></a>captive_kernel_exports ()</h3><pre class="programlisting">gboolean    captive_kernel_exports          (void);</pre><p>
45 Export complete libcaptive modules to reactos. It is done by *.def files used
46 by dlltool(1) of Mingw32 compiler suite. We use native host OS compiler and
47 we also have just a limited set of functions over reactos itself.
48 We use our <a href="captive-apiref-ldr-exports.html#captive-ModuleList-add-builtin">captive_ModuleList_add_builtin</a>() to simulate PE headers exporting
49 our symbols; this export simulation is invocated from this function.
50 </p><p>
51 This function is generated automatically from exports.captivesym file
52 by captivesym.pl script.
53 </p><p>
54 Multiple calls of this function are forbidden. See also <a href="captive-apiref-ldr-exports.html#captive-kernel-patches">captive_kernel_patches</a>().</p><p>
55
56 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <tt>TRUE</tt> if the export was successful.
57 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="captive-kernel-patches"></a>captive_kernel_patches ()</h3><pre class="programlisting">gboolean    captive_kernel_patches          (void);</pre><p>
58 Patches W32 libraries by libcaptive functions. It is done by *.def files used
59 by dlltool(1) of Mingw32 compiler suite. We use native host OS compiler and
60 we also have just a limited set of functions over reactos itself.
61 We use our <a href="captive-apiref-ldr-exports.html#captive-ModuleList-patch">captive_ModuleList_patch</a>() to modify existing module function
62 tables generated from <a href="captive-apiref-ldr-exports.html#captive-ModuleList-add-builtin">captive_ModuleList_add_builtin</a>().
63 </p><p>
64 This function is generated automatically from exports.captivesym file
65 by captivesym.pl script.
66 </p><p>
67 Multiple calls of this function are forbidden. See also <a href="captive-apiref-ldr-exports.html#captive-kernel-exports">captive_kernel_exports</a>().</p><p>
68
69 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <tt>TRUE</tt> if the export was successful.
70 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="captive-ModuleList-add-builtin"></a>captive_ModuleList_add_builtin ()</h3><pre class="programlisting">gboolean    captive_ModuleList_add_builtin  (const gchar *FullName_utf8,
71                                              ...);</pre><p>
72 Adds simulated built-in module to ModuleListHead module list.
73 It can be used for the functionality of reactos/ntoskrnl/ldr/loader.c/LdrInitModuleManagement().
74 libcaptive does not support Ordinals - we just pretend liner (<tt>0</tt>-based)
75 Ordinal numbers of the functions in given @... stdargs order.</p><p>
76
77 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>FullName_utf8</tt></i> :</span></td><td> String to fill in PMODULE_OBJECT-&gt;FullName.
78 </td></tr><tr><td><span class="term"><i><tt>...</tt></i> :</span></td><td> (const gchar *sym_name,void *sym_val) symbol list terminated by <tt>NULL</tt>.
79 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <tt>TRUE</tt> if the module was successfuly added.
80 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="captive-ModuleList-patch"></a>captive_ModuleList_patch ()</h3><pre class="programlisting">gboolean    captive_ModuleList_patch        (const gchar *FullName_utf8,
81                                              ...);</pre><p>
82 Patches existing <i><tt>FullName_utf8</tt></i> module to use for function named sym_name
83 pointer to the handler sym_val. If patchpoint is not <tt>NULL</tt> it gets assigned the original
84 pointer value (used for <tt>pass</tt> keyword in exports.captivesym).
85 </p><p>
86 Put here 0xF4 'hlt' instead of 0xCC 'int $0x3; breakpoint'
87 as 'hlt' will generate handled SIGSEGV instead of SIGTRAP which
88 is used by gdb(1) during debugging.
89 See also libcaptive/ps/signal.c/ sigaction_SIGSEGV().</p><p>
90
91 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>FullName_utf8</tt></i> :</span></td><td> String to find PMODULE_OBJECT by FullName.
92 </td></tr><tr><td><span class="term"><i><tt>...</tt></i> :</span></td><td> (const gchar *sym_name,void (*sym_val)(void),struct captive_ModuleList_patchpoint *patchpoint) symbol list terminated by <tt>NULL</tt>.
93 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <tt>TRUE</tt> if the module was successfuly added.
94 </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-storage.html"><b>&lt;&lt; storage</b></a></td><td align="right"><a accesskey="n" href="captive-apiref-calltype-reactos.html"><b>calltype_reactos &gt;&gt;</b></a></td></tr></table></body></html>