modperl bootstrap
[www.jankratochvil.net.git] / project / captive / apiref / captive-apiref-storage.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>storage</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-unicode-reactos.html" title="unicode_reactos"><link rel="next" href="captive-apiref-ldr-exports.html" title="ldr_exports"></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-unicode-reactos.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-ldr-exports.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-storage"></a><div class="titlepage"></div><div class="refnamediv"><h2>storage</h2><p>storage &#8212; </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
33
34
35
36 extern      GIOChannel *<a href="captive-apiref-storage.html#captive-image-iochannel">captive_image_iochannel</a>;
37 extern      guint64 <a href="captive-apiref-storage.html#captive-image-size">captive_image_size</a>;
38 guint64     <a href="captive-apiref-storage.html#captive-giochannel-size">captive_giochannel_size</a>         (GIOChannel *channel);
39 gboolean    <a href="captive-apiref-storage.html#captive-cdrom-init">captive_cdrom_init</a>              (void);
40 gboolean    <a href="captive-apiref-storage.html#captive-disk-init">captive_disk_init</a>               (void);
41 </pre></div><div class="refsect1" lang="en"><h2>Description</h2><p>
42
43 </p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="captive-image-iochannel"></a>captive_image_iochannel</h3><pre class="programlisting">extern GIOChannel *captive_image_iochannel;
44 </pre><p>
45 The readl GIOChannel to be used for accessing the disk image.
46 It may be either directly captive_options-&gt;image_iochannel
47 or the wrapper by giochannel-blind.</p><p>
48
49 </p></div><hr><div class="refsect2" lang="en"><h3><a name="captive-image-size"></a>captive_image_size</h3><pre class="programlisting">extern guint64 captive_image_size;
50 </pre><p>
51 Size of <a href="captive-apiref-storage.html#captive-image-iochannel">captive_image_iochannel</a>. Empty files are rejected and therefore
52 this value is always &gt;0 after successful <a href="captive-apiref-init.html#captive-init">captive_init</a>().
53 Value is detected by captive_giochannel_size(captive_image_iochannel).</p><p>
54
55 </p></div><hr><div class="refsect2" lang="en"><h3><a name="captive-giochannel-size"></a>captive_giochannel_size ()</h3><pre class="programlisting">guint64     captive_giochannel_size         (GIOChannel *channel);</pre><p>
56
57 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>channel</tt></i> :</span></td><td>
58 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>
59
60
61 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="captive-cdrom-init"></a>captive_cdrom_init ()</h3><pre class="programlisting">gboolean    captive_cdrom_init              (void);</pre><p>
62 Creates system device &quot;\Device\CdRom<tt>d</tt>&quot; providing readonly access
63 to the given <a href="captive-apiref-storage.html#captive-image-iochannel">captive_image_iochannel</a> as emulation of CD-ROM driver.
64 </p><p>
65 libcaptive currently supports just one drive and thus &quot;\Device\CdRom0&quot;
66 is always created. It is forbidden to call this function twice.</p><p>
67
68 </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 initialization was successful.
69 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="captive-disk-init"></a>captive_disk_init ()</h3><pre class="programlisting">gboolean    captive_disk_init               (void);</pre><p>
70 Creates system device &quot;\Device\CaptiveHarddisk<tt>d</tt>&quot; providing readwrite access
71 to the given <a href="captive-apiref-storage.html#captive-image-iochannel">captive_image_iochannel</a> as emulation of harddisk driver.
72 reactos initializes &quot;\Device\Harddisk<tt>d</tt>\Partition0&quot; as the whole disk
73 and each partition it founds by IoReadPartitionTable() it will create
74 as &quot;\Device\Harddisk<tt>d</tt>\Partition1&quot;, &quot;\Device\Harddisk<tt>d</tt>\Partition2&quot; etc.
75 </p><p>
76 libcaptive does not (yet?) support any partitions and it will always create
77 just the disk device for the whole given <a href="captive-apiref-storage.html#captive-image-iochannel">captive_image_iochannel</a>.
78 As this behaviour is a bit specific we rather create some non-standard name
79 of the device; anyway I have seen some &quot;\Device\Harddisk<tt>dVolume</tt><tt>d</tt>&quot; on W32
80 system.
81 </p><p>
82 captive currently supports just one drive and thus &quot;\Device\CaptiveHarddisk0&quot;
83 is always created. It is forbidden to call this function twice.</p><p>
84
85 </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 initialization was successful.
86 </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-unicode-reactos.html"><b>&lt;&lt; unicode_reactos</b></a></td><td align="right"><a accesskey="n" href="captive-apiref-ldr-exports.html"><b>ldr_exports &gt;&gt;</b></a></td></tr></table></body></html>