Click here to Skip to main content
15,895,283 members
Articles / Desktop Programming / MFC

Multi platform plug-in development made easy!

Rate me:
Please Sign up or sign in to vote.
4.04/5 (25 votes)
7 Mar 20065 min read 102.1K   1.9K   63  
How to use and develop plug-ins for multiple platforms.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>SPL Library: spl.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>spl.h File Reference</h1>SPL's main header.  
<a href="#_details">More...</a>
<p>
<code>#include "<a class="el" href="spl__platform_8h-source.html">include/spl_platform.h</a>"</code><br>
<code>#include "<a class="el" href="spl__typedefs_8h-source.html">include/spl_typedefs.h</a>"</code><br>
<code>#include "<a class="el" href="spl__pluginargs_8h-source.html">include/spl_pluginargs.h</a>"</code><br>
<code>#include "<a class="el" href="spl__plugininfo_8h-source.html">include/spl_plugininfo.h</a>"</code><br>
<code>#include "<a class="el" href="spl__pluginserver_8h-source.html">include/spl_pluginserver.h</a>"</code><br>
<code>#include &lt;string&gt;</code><br>

<p>
Include dependency graph for spl.h:<p><center><img src="spl_8h__incl.png" border="0" usemap="#spl.h_map" alt="Include dependency graph"></center>
<map name="spl.h_map">
<area href="spl__platform_8h.html" shape="rect" coords="273,17,407,44" alt="">
<area href="spl__typedefs_8h.html" shape="rect" coords="79,92,215,119" alt="">
<area href="spl__mutex_8h.html" shape="rect" coords="301,92,379,119" alt="">
<area href="spl__pluginargs_8h.html" shape="rect" coords="324,167,471,193" alt="">
<area href="spl__plugininfo_8h.html" shape="rect" coords="159,167,300,193" alt="">
<area href="spl__pluginserver_8h.html" shape="rect" coords="152,241,307,268" alt="">
</map>

<p>
<a href="spl_8h-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="spl_8h.html#a0">SPL_PLUGIN_API</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Macro for exporting <a class="el" href="namespaceSPL.html">SPL</a> functions.  <a href="#a0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="spl_8h.html#a1">SPL_DEFINE_PLUGIN_DLLMAIN</a>()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Macro for exporting SPL's default functions.  <a href="#a1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="spl_8h.html#a2">SPL_DEFINE_PLUGIN_EXPORTS</a>()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="spl_8h.html#a3">SPL_DEFINE_PLUGIN_INFO</a>(a_lBuildNumber,a_lMajorVersion,a_lMinorVersion,a_bPublicArgInfos,a_strName,a_strVendor,a_strDescription,a_strInfo,a_strHomepage,a_strEmail,a_strUUID)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Macro for exporting SPL's default functions.  <a href="#a3"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="spl_8h.html#a4">SPL_SET_PLUGIN_INIT_ARGUMENT</a>(a_strArgumentName, a_strArgumentDescription)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Macro for setting the plugin-side arguments for the "splInitialize" function.  <a href="#a4"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="spl_8h.html#a5">SPL_SET_PLUGIN_RUN_ARGUMENT</a>(a_strArgumentName, a_strArgumentDescription)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Macro for setting the plugin-side arguments for the "splRun" function.  <a href="#a5"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="spl_8h.html#a6">SPL_SET_PLUGIN_SHUTDOWN_ARGUMENT</a>(a_strArgumentName, a_strArgumentDescription)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Macro for setting the plugin-side arguments for the "splShutdown" function.  <a href="#a6"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="spl_8h.html#a7">SPL_IMPLEMENT_PLUGIN_GETINFO</a>()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Macro for implementing a default "splGetInfo" function.  <a href="#a7"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="spl_8h.html#a8">SPL_IMPLEMENT_PLUGIN_INITIALIZE</a>()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Macro for implementing a default "splInitialize" function.  <a href="#a8"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="spl_8h.html#a9">SPL_IMPLEMENT_PLUGIN_SHUTDOWN</a>()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Macro for implementing a default "splShutdown" function.  <a href="#a9"></a><br><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
SPL's main header. 
<p>
<dl compact><dt><b>Version:</b></dt><dd>1.0 </dd></dl>
<dl compact><dt><b>Author:</b></dt><dd>Andreas Loeffler</dd></dl>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="a1" doxytag="spl.h::SPL_DEFINE_PLUGIN_DLLMAIN" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define SPL_DEFINE_PLUGIN_DLLMAIN</td>
          <td class="md" valign="top">(&nbsp;</td>
&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Macro for exporting SPL's default functions. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a2" doxytag="spl.h::SPL_DEFINE_PLUGIN_EXPORTS" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define SPL_DEFINE_PLUGIN_EXPORTS</td>
          <td class="md" valign="top">(&nbsp;</td>
&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a3" doxytag="spl.h::SPL_DEFINE_PLUGIN_INFO" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define SPL_DEFINE_PLUGIN_INFO</td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">a_lBuildNumber,         <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>a_lMajorVersion,         <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>a_lMinorVersion,         <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>a_bPublicArgInfos,         <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>a_strName,         <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>a_strVendor,         <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>a_strDescription,         <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>a_strInfo,         <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>a_strHomepage,         <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>a_strEmail,         <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>a_strUUID&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Macro for exporting SPL's default functions. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a7" doxytag="spl.h::SPL_IMPLEMENT_PLUGIN_GETINFO" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define SPL_IMPLEMENT_PLUGIN_GETINFO</td>
          <td class="md" valign="top">(&nbsp;</td>
&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<b>Value:</b><div class="fragment"><pre>\
        <a class="code" href="spl_8h.html#a0">SPL_PLUGIN_API</a> <a class="code" href="classSPL_1_1slcPluginInfo.html">slcPluginInfo</a>* <a class="code" href="spl__pluginserver_8h.html#a8">SPL_GETINFO_NAME_CODE</a>( <span class="keywordtype">void</span> )             \
        {                                                                                                                               \
                <span class="keywordflow">return</span> &amp;g_pluginInfo;                                                                           \
        }
</pre></div>Macro for implementing a default "splGetInfo" function. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a8" doxytag="spl.h::SPL_IMPLEMENT_PLUGIN_INITIALIZE" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define SPL_IMPLEMENT_PLUGIN_INITIALIZE</td>
          <td class="md" valign="top">(&nbsp;</td>
&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<b>Value:</b><div class="fragment"><pre>\
        <a class="code" href="spl_8h.html#a0">SPL_PLUGIN_API</a> <span class="keywordtype">bool</span> <a class="code" href="spl__pluginserver_8h.html#a2">SPL_INIT_NAME_CODE</a>( <a class="code" href="classSPL_1_1slcPluginArgs.html">slcPluginArgs</a>* a_pPluginArgs )  \
        {                                                                                                                                               \
                <span class="keywordflow">return</span> <span class="keyword">true</span>;                                                                                                            \
        }
</pre></div>Macro for implementing a default "splInitialize" function. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a9" doxytag="spl.h::SPL_IMPLEMENT_PLUGIN_SHUTDOWN" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define SPL_IMPLEMENT_PLUGIN_SHUTDOWN</td>
          <td class="md" valign="top">(&nbsp;</td>
&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<b>Value:</b><div class="fragment"><pre>\
        <a class="code" href="spl_8h.html#a0">SPL_PLUGIN_API</a> <span class="keywordtype">bool</span> <a class="code" href="spl__pluginserver_8h.html#a6">SPL_SHUTDOWN_NAME_CODE</a>( <a class="code" href="classSPL_1_1slcPluginArgs.html">slcPluginArgs</a>* a_pPluginArgs )      \
        {                                                                                                                                                       \
                <span class="keywordflow">return</span> <span class="keyword">true</span>;                                                                                                                    \
        }
</pre></div>Macro for implementing a default "splShutdown" function. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a0" doxytag="spl.h::SPL_PLUGIN_API" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define SPL_PLUGIN_API
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Macro for exporting <a class="el" href="namespaceSPL.html">SPL</a> functions. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a4" doxytag="spl.h::SPL_SET_PLUGIN_INIT_ARGUMENT" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define SPL_SET_PLUGIN_INIT_ARGUMENT</td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">a_strArgumentName,         <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>a_strArgumentDescription&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<b>Value:</b><div class="fragment"><pre>\
        g_pluginInfo.SetArgument( slcPluginInfo::sleFunction_Init, a_strArgumentName, a_strArgumentDescription );
</pre></div>Macro for setting the plugin-side arguments for the "splInitialize" function. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a5" doxytag="spl.h::SPL_SET_PLUGIN_RUN_ARGUMENT" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define SPL_SET_PLUGIN_RUN_ARGUMENT</td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">a_strArgumentName,         <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>a_strArgumentDescription&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<b>Value:</b><div class="fragment"><pre>\
        g_pluginInfo.SetArgument( slcPluginInfo::sleFunction_Run, a_strArgumentName, a_strArgumentDescription );
</pre></div>Macro for setting the plugin-side arguments for the "splRun" function. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a6" doxytag="spl.h::SPL_SET_PLUGIN_SHUTDOWN_ARGUMENT" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define SPL_SET_PLUGIN_SHUTDOWN_ARGUMENT</td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">a_strArgumentName,         <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>a_strArgumentDescription&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<b>Value:</b><div class="fragment"><pre>\
        g_pluginInfo.SetArgument( slcPluginInfo::sleFunction_Shutdown, a_strArgumentName, a_strArgumentDescription );
</pre></div>Macro for setting the plugin-side arguments for the "splShutdown" function. 
<p>
    </td>
  </tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Sun May 9 15:01:05 2004 for SPL Library by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.6 </small></address>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Germany Germany
I was born in 1982 near Stuttgart / Germany and began my first steps in programming computers at the age of only nine years on an old Commodore CBM 7072. In 2002 I finished my education as IT specialist for software engineering and did my civillian service afterwards. Currently I'm working as leader of the software division in a bigger company located in south west Germany, mainly on software development and research projects for multimedia terminals and user recognition/verification systems.

Comments and Discussions