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 {
5 border: solid 1px #aaaaaa;
10 border: solid 1px #aaaaff;
19 border: solid 1px #ffaaaa;
26 .navigation a:visited {
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 — </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
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>
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;
45 The readl GIOChannel to be used for accessing the disk image.
46 It may be either directly captive_options->image_iochannel
47 or the wrapper by giochannel-blind.</p><p>
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;
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 >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>
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>
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>
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 "\Device\CdRom<tt>d</tt>" 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.
65 libcaptive currently supports just one drive and thus "\Device\CdRom0"
66 is always created. It is forbidden to call this function twice.</p><p>
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 "\Device\CaptiveHarddisk<tt>d</tt>" 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 "\Device\Harddisk<tt>d</tt>\Partition0" as the whole disk
73 and each partition it founds by IoReadPartitionTable() it will create
74 as "\Device\Harddisk<tt>d</tt>\Partition1", "\Device\Harddisk<tt>d</tt>\Partition2" etc.
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 "\Device\Harddisk<tt>dVolume</tt><tt>d</tt>" on W32
82 captive currently supports just one drive and thus "\Device\CaptiveHarddisk0"
83 is always created. It is forbidden to call this function twice.</p><p>
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><< unicode_reactos</b></a></td><td align="right"><a accesskey="n" href="captive-apiref-ldr-exports.html"><b>ldr_exports >></b></a></td></tr></table></body></html>