initial commit

This commit is contained in:
root
2023-06-12 09:14:09 +02:00
commit b4912f303e
2545 changed files with 209350 additions and 0 deletions

View File

@@ -0,0 +1,379 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>Documentation VISION (VAPI) : INI Interface</title></head>
<body background="../images/conc2.gif" bgcolor="#ffffff">
<div align="center"><center>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td align="center" width="17%"><a href="co.htm"><img src="../images/cprev.jpg" alt="Chapitre pr<70>c<EFBFBD>dent" border="0" height="26" hspace="2" width="46"></a><a href="index.htm"><img src="../images/csom.jpg" alt="Retour au sommaire" border="0" height="27" hspace="2" width="32"></a><a href="lo.htm"><img style="border: 0px solid ; width: 43px; height: 26px;" src="../images/csuiv.jpg" alt="Chapitre suivant" hspace="2"></a></td>
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icoprinc.gif" height="71" width="59"></p>
</td>
<td width="33%"><p align="center"><font color="#0000ff" size="5"><strong>Documentation </strong><em><strong>VISION
(VAPI)</strong></em></font></p>
</td>
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icointro.gif" height="71" width="59"></p>
</td>
<td valign="top" width="17%"><p align="left">Derni<EFBFBD>re
mise <20> jour : 19/05/18</p>
</td>
</tr>
<tr>
<td width="17%"><p align="center"><a href="..%5C..%5C..%5Cdownload/dvldv.zip">T<EFBFBD>l<EFBFBD>charger la doc</a></p>
</td>
<td width="33%"><p align="center"><font size="4"><strong>INI
INTERFACE</strong></font></p>
</td>
<td align="center" width="17%">&nbsp;&nbsp;</td>
</tr>
</tbody></table>
</center></div>
<hr>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td colspan="2" align="center"><strong>R<EFBFBD>sum<EFBFBD></strong></td>
</tr>
<tr>
<td width="15%"><strong>Pr<EFBFBD>fixe de l'interface</strong></td>
<td width="85%">In</td>
</tr>
<tr>
<td width="15%"><strong>Nombre de fonctions</strong></td>
<td width="85%">6</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Ensemble de fonctions permettant de
manipuler des fichiers au format INI. Le nombre de
fichiers INI pouvant <20>tre g<>r<EFBFBD>s sumultan<61>ment est de
3.</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="InOpen"></a><strong>Prototype</strong></td>
<td width="85%">long cdecl <strong>InOpen</strong>(char
*file)</td>
</tr>
<tr>
<td width="15%"><strong>Param<EFBFBD>tres</strong></td>
<td width="85%"><strong>[IN]</strong> file : Nom du
fichier INI </td>
</tr>
<tr>
<td width="15%"><strong>Retour</strong></td>
<td width="85%">Si &gt;= 0 : un identifiant de fichier
INI<br>
Si &lt; 0, il n'y a plus d'identifiant INI disponible
(les 3 sont d<>j<EFBFBD> utilis<69>s)</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">R<EFBFBD>serve un identifiant INI en vue
d'op<6F>rations sur un fichier INI. Si le fichier file
n'existe pas, un identifiant est tout de m<>me renvoy<6F>,
le fichier devra ensuite <20>tre sauv<75> par la fonction <a href="#InSaveAndClose">InSaveAndClose</a>.</td>
</tr>
<tr>
<td width="15%"><strong>Remarques</strong></td>
<td width="85%">&nbsp;</td>
</tr>
<tr>
<td width="15%"><strong>Version VAPI</strong></td>
<td width="85%">1.02 ou sup<75>rieure</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="InClose"></a><strong>Prototype</strong></td>
<td width="85%">long cdecl <strong>InClose</strong>(long
hini)</td>
</tr>
<tr>
<td width="15%"><strong>Param<EFBFBD>tres</strong></td>
<td width="85%"><strong>[IN]</strong> hini : un
identifiant de fichier INI pr<70>c<EFBFBD>demment renvoy<6F> par <a href="#InOpen">InOpen</a></td>
</tr>
<tr>
<td width="15%"><strong>Retour</strong></td>
<td width="85%">0 : Succ<63>s<br>
-1 : Identifiant invalide</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Lib<EFBFBD>re l'identifiant de fichier INI. Ne
sauve pas les modifications, pour cela utiliser <a href="#InSaveAndClose">InSaveAndClose</a>.</td>
</tr>
<tr>
<td width="15%"><strong>Remarques</strong></td>
<td width="85%">&nbsp;</td>
</tr>
<tr>
<td width="15%"><strong>Version VAPI</strong></td>
<td width="85%">1.02 ou sup<75>rieure</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="InSaveAndClose"></a><strong>Prototype</strong></td>
<td width="85%">long cdecl <strong>InSaveAndClose</strong>(long
hini, char *new_name)</td>
</tr>
<tr>
<td width="15%"><strong>Param<EFBFBD>tres</strong></td>
<td width="85%"><strong>[IN]</strong> hini : un
identifiant de fichier INI pr<70>c<EFBFBD>demment renvoy<6F> par <a href="#InOpen">InOpen</a><br>
<strong>[IN]</strong> new_name : nouveau nom de
sauvegarde. NULL si inchang<6E> par rapport <20> l'appel <20> <a href="#InOpen">InOpen</a></td>
</tr>
<tr>
<td width="15%"><strong>Retour</strong></td>
<td width="85%">0 : Succ<63>s<br>
-1 : Identifiant invalide ou sauvegarde impossible</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">G<EFBFBD>n<EFBFBD>re un fichier INI en validant
d<>finitivement toutes les modifications apport<72>es
depuis l'appel <20> <a href="#InOpen">InOpen</a></td>
</tr>
<tr>
<td width="15%"><strong>Remarques</strong></td>
<td width="85%">&nbsp;</td>
</tr>
<tr>
<td width="15%"><strong>Version VAPI</strong></td>
<td width="85%">1.02 ou sup<75>rieure</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="InGetKey"></a><strong>Prototype</strong></td>
<td width="85%">long cdecl <strong>InGetKey</strong>(long
hini, char *section, char *key, char *val_key)</td>
</tr>
<tr>
<td width="15%"><strong>Param<EFBFBD>tres</strong></td>
<td width="85%"><strong>[IN]</strong> hini : un
identifiant de fichier INI pr<70>c<EFBFBD>demment renvoy<6F> par <a href="#InOpen">InOpen</a><br>
<strong>[IN]</strong> section : nom de la section<br>
<strong>[IN] </strong>key : nom de la cl<63><br>
<strong>[OUT]</strong> val_key : buffer destin<69> <20>
recevoir la valeur de la cl<63> en ASCII</td>
</tr>
<tr>
<td width="15%"><strong>Retour</strong></td>
<td width="85%">0 : Echec : la cl<63> ou la section n'ont
pas <20>t<EFBFBD> trouv<75>es<br>
1 : Succ<63>s, la valeur ASCII de la cl<63> de cette section
est pr<70>sente dans val_key</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Recherche une cl<63> particuli<6C>re dans une
section particuli<6C>re</td>
</tr>
<tr>
<td width="15%"><strong>Remarques</strong></td>
<td width="85%">&nbsp;</td>
</tr>
<tr>
<td width="15%"><strong>Version VAPI</strong></td>
<td width="85%">1.02 ou sup<75>rieure</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="InSetKey"></a><strong>Prototype</strong></td>
<td width="85%">long cdecl <strong>InSetKey</strong>(long
hini, char *section, char *key, char *val_key)</td>
</tr>
<tr>
<td width="15%"><strong>Param<EFBFBD>tres</strong></td>
<td width="85%"><strong>[IN]</strong> hini : un
identifiant de fichier INI pr<70>c<EFBFBD>demment renvoy<6F> par <a href="#InOpen">InOpen</a><br>
<strong>[IN]</strong> section : nom de la section<br>
<strong>[IN] </strong>key : nom de la cl<63><br>
<strong>[IN] </strong>val_key : buffer contenant la
valeur de la cl<63> en ASCII</td>
</tr>
<tr>
<td width="15%"><strong>Retour</strong></td>
<td width="85%">0 : Echec : la cl<63> ou la section n'ont
pas pu <20>tre cr<63>es ou modifi<66>es par manque de m<>moire<br>
1 : Succ<63>s</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Ajoute ou modifie une section et/ou une
cl<63></td>
</tr>
<tr>
<td width="15%"><strong>Remarques</strong></td>
<td width="85%">Si la section ou la cl<63> nexiste pas,
elle est cr<63>e</td>
</tr>
<tr>
<td width="15%"><strong>Version VAPI</strong></td>
<td width="85%">1.02 ou sup<75>rieure</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="InGetOrSetKey"></a><strong>Prototype</strong></td>
<td width="85%">long cdecl <strong>InGetOrSetKey</strong>(long
hini, char *section, char *key, char *val_key)</td>
</tr>
<tr>
<td width="15%"><strong>Param<EFBFBD>tres</strong></td>
<td width="85%"><strong>[IN]</strong> hini : un
identifiant de fichier INI pr<70>c<EFBFBD>demment renvoy<6F> par <a href="#InOpen">InOpen</a><br>
<strong>[IN]</strong> section : nom de la section<br>
<strong>[IN] </strong>key : nom de la cl<63><br>
<strong>[IN/OUT] </strong>val_key : buffer contenant la
valeur par d<>faut de la cl<63> en ASCII (<strong>[IN]</strong>)
et/ou la valeur lue de la cl<63> (<strong>[OUT]</strong>)</td>
</tr>
<tr>
<td width="15%"><strong>Retour</strong></td>
<td width="85%">0 : La cl<63> a <20>t<EFBFBD> relue avec succ<63>s<br>
1 : La cl<63> a du <20>tre cr<63>ee.</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Permet de retrouver la valeur d'une cl<63>
dans une section et, si cette cl<63> ou cette section
n'existe pas de la mettre en place avec une valeur par
d<>faut.</td>
</tr>
<tr>
<td width="15%"><strong>Remarques</strong></td>
<td width="85%">Tr<EFBFBD>s pratique !</td>
</tr>
<tr>
<td width="15%"><strong>Version VAPI</strong></td>
<td width="85%">1.02 ou sup<75>rieure</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="InGetKeyFromFile"></a><strong>Prototype</strong></td>
<td width="85%">long cdecl <strong>InGetKeyFromFile</strong>(char *file, char *section, char *key, char *val_key)</td>
</tr>
<tr>
<td width="15%"><strong>Param<EFBFBD>tres</strong></td>
<td width="85%"><strong>[IN]</strong> file : Nom du
fichier INI<a href="in.htm#InOpen"></a><br>
<strong>[IN]</strong> section : nom de la section<br>
<strong>[IN] </strong>key : nom de la cl<63><br>
<strong>[IN/OUT] </strong>val_key : buffer contenant la
valeur par d<>faut de la cl<63> en ASCII (<strong>[IN]</strong>)
et/ou la valeur lue de la cl<63> (<strong>[OUT]</strong>)</td>
</tr>
<tr>
<td width="15%"><strong>Retour</strong></td>
<td width="85%">0 : La cl<63> n'a pu <20>tre retrouv<75>e (fichier/section/cl<63> inexistant)<br>
1 : La cl<63> a <20>t<EFBFBD> relue avec succ<63>s.</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Permet
de retrouver la valeur d'une cl<63> dans une section directement sans
cr<EFBFBD>rer la cl<63> comme dans la fonction pr<70>c<EFBFBD>dente (pratique pour juste
relire une valeur ponctuellement)</td>
</tr>
<tr>
<td width="15%"><strong>Remarques</strong></td>
<td width="85%">Tr<EFBFBD>s pratique !</td>
</tr>
<tr>
<td width="15%"><strong>Version VAPI</strong></td>
<td width="85%">1.04 ou sup<75>rieure</td>
</tr>
</tbody></table>
</center></div>
<font size="3"><br></font><pre><font size="3">Exemple d'utilisation: retrouver une cl<63> propri<72>taire dans un LDV<br>long hini, must_save ;<br>short angle = 90; </font><font color="#000080" size="3"><em>/* Valeur par d<>faut */</em></font><font size="3">
char buffer[256] ;
char *path_ldv, *language ;
path_ldv = Vapi-&gt;</font><a href="co.htm#CoGetLDVPath"><font size="3">CoGetLDVPath</font></a><font size="3">() ; </font><font color="#000080" size="3">/* R<>cup<75>re le chemin courant des LDV */</font><font size="3">
language = Vapi-&gt;</font><a href="co.htm#CoGetCurrentLanguage"><font size="3">CoGetCurrentLanguage</font></a><font size="3">() ; </font><font color="#000080" size="3">/* R<>cup<75>re la langue actuelle */</font><font size="3">
if ( path_ldv &amp;&amp; language )
{
sprintf( buffer, "%s\\%s\\MYLDV.INI", path_ldv, language ) ;
hini = Vapi-&gt;</font><a href="#InOpen"><font size="3">InOpen</font></a><font size="3">( buffer ) ;<br> if ( hini &gt;= 0 )<br> {<br> sprintf( buffer, "%d", angle ) ; </font><font color="#000080" size="3"><em>/* Mise en place de la valeur par d<>faut */</em></font><font size="3">
must_save = Vapi-&gt;</font><a href="#InGetOrSetKey"><font size="3">InGetOrSetKey</font></a><font size="3">( hini, "Parameters", "Angle", buffer ) ;<br> angle = atoi( buffer ) ; </font><font color="#000080" size="3"><em>/* Soit angle vaudra 90 (valeur par d<>faut), soit la valeur donn<6E>e par le fichier INI */</em></font><font size="3">
if ( must_save ) Vapi-&gt;</font><a href="#InSaveAndClose"><font size="3">InSaveAndClose</font></a><font size="3">( hini ) ; </font><font color="#000080" size="3"><em>/* Sauvegarde si la cl<63> n'existait pas */</em></font><font size="3">
else Vapi-&gt;</font><a href="#InClose"><font size="3">InClose</font></a><font size="3">( hini ) ; </font><font color="#000080" size="3"><em>/* Fermeture normale sinon */</em></font><font size="3">
}
}</font></pre>
<hr>
<div align="center"><center>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td align="center" width="17%"><a href="co.htm"><img src="../images/cprev.jpg" alt="Chapitre pr<70>c<EFBFBD>dent" border="0" height="26" hspace="2" width="46"></a><a href="index.htm"><img src="../images/csom.jpg" alt="Retour au sommaire" border="0" height="26" hspace="2" width="26"></a><a href="lo.htm"><img style="border: 0px solid ; width: 43px; height: 26px;" src="../images/csuiv.jpg" alt="Chapitre suivant" hspace="2"></a></td>
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icoprinc.gif" height="71" width="59"></p>
</td>
<td width="33%"><p align="center"><font color="#0000ff" size="5"><strong>Documentation </strong><em><strong>VISION
(VAPI)</strong></em></font></p>
</td>
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icointro.gif" height="71" width="59"></p>
</td>
<td valign="top" width="17%"><p align="left">Derni<EFBFBD>re
mise <20> jour : 19/05/18</p>
</td>
</tr>
<tr>
<td width="17%"><p align="center"><a href="..%5C..%5C..%5Cdownload/dvldv.zip">T<EFBFBD>l<EFBFBD>charger la doc</a></p>
</td>
<td width="33%"><p align="center"><font size="4"><strong>INI
INTERFACE</strong></font></p>
</td>
<td valign="top" width="17%">&nbsp; </td>
</tr>
</tbody></table>
</center></div>
</body></html>