<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>unbound: winrc/w_inst.h File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.9 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="dir_6ddbd83ded91923648db8c933be08f55.html">winrc</a> </div> </div> <div class="contents"> <h1>w_inst.h File Reference</h1>Contains install and remove functions that manipulate the windows services API and windows registry. <a href="#_details">More...</a> <p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="w__inst_8h.html#8afb9bcf6ef58232659a71c0dde08cb6">wsvc_install</a> (FILE *out, const char *rename)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Install service in servicecontrolmanager, setup registry. <a href="#8afb9bcf6ef58232659a71c0dde08cb6"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="w__inst_8h.html#29c62e15bbdd23d0060b06ea7d0fecce">wsvc_remove</a> (FILE *out)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Remove installed service from servicecontrolmanager, registry entries. <a href="#29c62e15bbdd23d0060b06ea7d0fecce"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="w__inst_8h.html#42cbc3ef352917b1fc7ab5d253872ae6">wsvc_rc_start</a> (FILE *out)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Start the service from servicecontrolmanager, tells OS to start <a class="el" href="structdaemon.html" title="Structure holding worker list.">daemon</a>. <a href="#42cbc3ef352917b1fc7ab5d253872ae6"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="w__inst_8h.html#ece1bfc89f4396b52b5f57546a78c8a5">wsvc_rc_stop</a> (FILE *out)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Stop the service from servicecontrolmanager, tells OS to stop <a class="el" href="structdaemon.html" title="Structure holding worker list.">daemon</a>. <a href="#ece1bfc89f4396b52b5f57546a78c8a5"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="w__inst_8h.html#33b74a27e817ce68baa230b472bf73f6">wsvc_err2str</a> (char *str, size_t len, const char *fixed, DWORD err)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert windows GetLastError() value to a neat string. <a href="#33b74a27e817ce68baa230b472bf73f6"></a><br></td></tr> </table> <hr><h2>Detailed Description</h2> Contains install and remove functions that manipulate the windows services API and windows registry. <p> <hr><h2>Function Documentation</h2> <a class="anchor" name="8afb9bcf6ef58232659a71c0dde08cb6"></a><!-- doxytag: member="w_inst.h::wsvc_install" ref="8afb9bcf6ef58232659a71c0dde08cb6" args="(FILE *out, const char *rename)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void wsvc_install </td> <td>(</td> <td class="paramtype">FILE * </td> <td class="paramname"> <em>out</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>rename</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Install service in servicecontrolmanager, setup registry. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>out,:</em> </td><td>debug output printed here (errors). or NULL. </td></tr> <tr><td valign="top"></td><td valign="top"><em>rename,:</em> </td><td>if nonNULL this executable is not unbound.exe but this name. </td></tr> </table> </dl> <p>References <a class="el" href="w__inst_8c_source.html#l00175">change()</a>, <a class="el" href="w__inst_8c_source.html#l00073">event_reg_install()</a>, <a class="el" href="w__inst_8c_source.html#l00062">fatal_win()</a>, <a class="el" href="w__inst_8c_source.html#l00162">quote_it()</a>, and <a class="el" href="win__svc_8h_source.html#l00052">SERVICE_NAME</a>.</p> <p>Referenced by <a class="el" href="unbound-service-install_8c_source.html#l00050">main()</a>, and <a class="el" href="win__svc_8c_source.html#l00421">wsvc_command_option()</a>.</p> </div> </div><p> <a class="anchor" name="29c62e15bbdd23d0060b06ea7d0fecce"></a><!-- doxytag: member="w_inst.h::wsvc_remove" ref="29c62e15bbdd23d0060b06ea7d0fecce" args="(FILE *out)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void wsvc_remove </td> <td>(</td> <td class="paramtype">FILE * </td> <td class="paramname"> <em>out</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Remove installed service from servicecontrolmanager, registry entries. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>out,:</em> </td><td>debug output printed here (errors). or NULL. </td></tr> </table> </dl> <p>References <a class="el" href="w__inst_8c_source.html#l00131">event_reg_remove()</a>, <a class="el" href="w__inst_8c_source.html#l00062">fatal_win()</a>, and <a class="el" href="win__svc_8h_source.html#l00052">SERVICE_NAME</a>.</p> <p>Referenced by <a class="el" href="unbound-service-remove_8c_source.html#l00050">main()</a>, and <a class="el" href="win__svc_8c_source.html#l00421">wsvc_command_option()</a>.</p> </div> </div><p> <a class="anchor" name="42cbc3ef352917b1fc7ab5d253872ae6"></a><!-- doxytag: member="w_inst.h::wsvc_rc_start" ref="42cbc3ef352917b1fc7ab5d253872ae6" args="(FILE *out)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void wsvc_rc_start </td> <td>(</td> <td class="paramtype">FILE * </td> <td class="paramname"> <em>out</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Start the service from servicecontrolmanager, tells OS to start <a class="el" href="structdaemon.html" title="Structure holding worker list.">daemon</a>. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>out,:</em> </td><td>debug output printed here (errors). or NULL. </td></tr> </table> </dl> <p>References <a class="el" href="w__inst_8c_source.html#l00062">fatal_win()</a>, and <a class="el" href="win__svc_8h_source.html#l00052">SERVICE_NAME</a>.</p> <p>Referenced by <a class="el" href="unbound-service-install_8c_source.html#l00050">main()</a>.</p> </div> </div><p> <a class="anchor" name="ece1bfc89f4396b52b5f57546a78c8a5"></a><!-- doxytag: member="w_inst.h::wsvc_rc_stop" ref="ece1bfc89f4396b52b5f57546a78c8a5" args="(FILE *out)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void wsvc_rc_stop </td> <td>(</td> <td class="paramtype">FILE * </td> <td class="paramname"> <em>out</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Stop the service from servicecontrolmanager, tells OS to stop <a class="el" href="structdaemon.html" title="Structure holding worker list.">daemon</a>. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>out,:</em> </td><td>debug output printed here (errors). or NULL. </td></tr> </table> </dl> <p>References <a class="el" href="w__inst_8c_source.html#l00062">fatal_win()</a>, and <a class="el" href="win__svc_8h_source.html#l00052">SERVICE_NAME</a>.</p> <p>Referenced by <a class="el" href="unbound-service-remove_8c_source.html#l00050">main()</a>.</p> </div> </div><p> <a class="anchor" name="33b74a27e817ce68baa230b472bf73f6"></a><!-- doxytag: member="w_inst.h::wsvc_err2str" ref="33b74a27e817ce68baa230b472bf73f6" args="(char *str, size_t len, const char *fixed, DWORD err)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void wsvc_err2str </td> <td>(</td> <td class="paramtype">char * </td> <td class="paramname"> <em>str</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"> <em>len</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>fixed</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">DWORD </td> <td class="paramname"> <em>err</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Convert windows GetLastError() value to a neat string. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>str,:</em> </td><td>destination buffer </td></tr> <tr><td valign="top"></td><td valign="top"><em>len,:</em> </td><td>length of dest buffer </td></tr> <tr><td valign="top"></td><td valign="top"><em>fixed,:</em> </td><td>fixed text to prepend to string. </td></tr> <tr><td valign="top"></td><td valign="top"><em>err,:</em> </td><td>the GetLastError() value. </td></tr> </table> </dl> <p>Referenced by <a class="el" href="w__inst_8c_source.html#l00062">fatal_win()</a>, and <a class="el" href="win__svc_8c_source.html#l00127">reportev()</a>.</p> </div> </div><p> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Tue Oct 13 06:46:33 2009 for unbound by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> </body> </html>