<refentry id="libole2-Common" revision="9 Jun 2000">
<refmeta>
<refentrytitle>Common</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBOLE2 Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>Common</refname><refpurpose></refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>

#include &lt;libole2/libole2.h&gt;


enum        <link linkend="MsOleErr">MsOleErr</link>;
typedef     <link linkend="MsOlePos">MsOlePos</link>;
typedef     <link linkend="MsOleSPos">MsOleSPos</link>;
struct      <link linkend="MsOleStat">MsOleStat</link>;
enum        <link linkend="MsOleType">MsOleType</link>;
enum        <link linkend="MsOleSeek">MsOleSeek</link>;
struct      <link linkend="MsOleSysWrappers">MsOleSysWrappers</link>;
#define     <link linkend="MS-OLE-GET-GUINT8">MS_OLE_GET_GUINT8</link>               (p)
#define     <link linkend="MS-OLE-GET-GUINT16">MS_OLE_GET_GUINT16</link>              (p)
#define     <link linkend="MS-OLE-GET-GUINT32">MS_OLE_GET_GUINT32</link>              (p)
#define     <link linkend="MS-OLE-GET-GUINT64">MS_OLE_GET_GUINT64</link>              (p)
#define     <link linkend="MS-OLE-SET-GUINT8">MS_OLE_SET_GUINT8</link>               (p,n)
#define     <link linkend="MS-OLE-SET-GUINT16">MS_OLE_SET_GUINT16</link>              (p,n)
#define     <link linkend="MS-OLE-SET-GUINT32">MS_OLE_SET_GUINT32</link>              (p,n)
</synopsis>
</refsynopsisdiv>





<refsect1>
<title>Description</title>
<para>

</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="MsOleErr">enum MsOleErr</title>
<programlisting>typedef enum {
	MS_OLE_ERR_OK,
	MS_OLE_ERR_EXIST,
	MS_OLE_ERR_INVALID,
	MS_OLE_ERR_FORMAT,
	MS_OLE_ERR_PERM,
	MS_OLE_ERR_MEM,
	MS_OLE_ERR_SPACE,
	MS_OLE_ERR_NOTEMPTY,
	MS_OLE_ERR_BADARG
} MsOleErr;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="MsOlePos">MsOlePos</title>
<programlisting>typedef guint32 MsOlePos;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="MsOleSPos">MsOleSPos</title>
<programlisting>typedef gint32  MsOleSPos;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="MsOleStat">struct MsOleStat</title>
<programlisting>struct MsOleStat {
	MsOleType type;
	MsOlePos  size;
};
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="MsOleType">enum MsOleType</title>
<programlisting>typedef enum  {
	MsOleStorageT = 1,
	MsOleStreamT  = 2,
	MsOleRootT    = 5
} MsOleType;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="MsOleSeek">enum MsOleSeek</title>
<programlisting>typedef enum {
	MsOleSeekSet,
	MsOleSeekCur,
	MsOleSeekEnd
} MsOleSeek;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="MsOleSysWrappers">struct MsOleSysWrappers</title>
<programlisting>struct MsOleSysWrappers {
	int     (*open2)	(const char *pathname, int flags);
	int     (*open3)	(const char *pathname, int flags, mode_t mode);
	ssize_t (*read)		(int fd, void *buf, size_t count);
	int     (*close)	(int fd);
	ssize_t (*write)	(int fd, const void *buf, size_t count);
	off_t   (*lseek)	(int fd, off_t offset, int whence);
	int     (*isregfile)	(int fd);
	int     (*getfilesize)	(int fd, guint32 *size);
};
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="MS-OLE-GET-GUINT8">MS_OLE_GET_GUINT8()</title>
<programlisting>#define MS_OLE_GET_GUINT8(p)  (*((const guint8 *)(p) + 0))
</programlisting>
<para>

</para><informaltable pgwide=1 frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>p</parameter>&nbsp;:</entry>
<entry>

</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="MS-OLE-GET-GUINT16">MS_OLE_GET_GUINT16()</title>
<programlisting>#define     MS_OLE_GET_GUINT16(p)</programlisting>
<para>

</para><informaltable pgwide=1 frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>p</parameter>&nbsp;:</entry>
<entry>

</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="MS-OLE-GET-GUINT32">MS_OLE_GET_GUINT32()</title>
<programlisting>#define     MS_OLE_GET_GUINT32(p)</programlisting>
<para>

</para><informaltable pgwide=1 frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>p</parameter>&nbsp;:</entry>
<entry>

</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="MS-OLE-GET-GUINT64">MS_OLE_GET_GUINT64()</title>
<programlisting>#define     MS_OLE_GET_GUINT64(p)</programlisting>
<para>

</para><informaltable pgwide=1 frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>p</parameter>&nbsp;:</entry>
<entry>

</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="MS-OLE-SET-GUINT8">MS_OLE_SET_GUINT8()</title>
<programlisting>#define MS_OLE_SET_GUINT8(p,n)  (*((guint8 *)(p) + 0) = n)
</programlisting>
<para>

</para><informaltable pgwide=1 frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>p</parameter>&nbsp;:</entry>
<entry></entry></row>
<row><entry align="right"><parameter>n</parameter>&nbsp;:</entry>
<entry>

</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="MS-OLE-SET-GUINT16">MS_OLE_SET_GUINT16()</title>
<programlisting>#define     MS_OLE_SET_GUINT16(p,n)</programlisting>
<para>

</para><informaltable pgwide=1 frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>p</parameter>&nbsp;:</entry>
<entry></entry></row>
<row><entry align="right"><parameter>n</parameter>&nbsp;:</entry>
<entry>

</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="MS-OLE-SET-GUINT32">MS_OLE_SET_GUINT32()</title>
<programlisting>#define     MS_OLE_SET_GUINT32(p,n)</programlisting>
<para>

</para><informaltable pgwide=1 frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>p</parameter>&nbsp;:</entry>
<entry></entry></row>
<row><entry align="right"><parameter>n</parameter>&nbsp;:</entry>
<entry>

</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>




</refentry>
