Maintained by: NLnet Labs
Functions
w_inst.h File Reference

Contains install and remove functions that manipulate the windows services API and windows registry. More...

Functions

void wsvc_install (FILE *out, const char *rename)
 Install service in servicecontrolmanager, setup registry. More...
 
void wsvc_remove (FILE *out)
 Remove installed service from servicecontrolmanager, registry entries. More...
 
void wsvc_rc_start (FILE *out)
 Start the service from servicecontrolmanager, tells OS to start daemon. More...
 
void wsvc_rc_stop (FILE *out)
 Stop the service from servicecontrolmanager, tells OS to stop daemon. More...
 
void wsvc_err2str (char *str, size_t len, const char *fixed, DWORD err)
 Convert windows GetLastError() value to a neat string. More...
 

Detailed Description

Contains install and remove functions that manipulate the windows services API and windows registry.

Function Documentation

void wsvc_install ( FILE *  out,
const char *  rename 
)

Install service in servicecontrolmanager, setup registry.

Parameters
out,:debug output printed here (errors). or NULL.
rename,:if nonNULL this executable is not unbound.exe but this name.

References change(), event_reg_install(), fatal_win(), quote_it(), and SERVICE_NAME.

Referenced by main(), and wsvc_command_option().

void wsvc_remove ( FILE *  out)

Remove installed service from servicecontrolmanager, registry entries.

Parameters
out,:debug output printed here (errors). or NULL.

References event_reg_remove(), fatal_win(), and SERVICE_NAME.

Referenced by main(), and wsvc_command_option().

void wsvc_rc_start ( FILE *  out)

Start the service from servicecontrolmanager, tells OS to start daemon.

Parameters
out,:debug output printed here (errors). or NULL.

References fatal_win(), and SERVICE_NAME.

Referenced by main(), and wsvc_command_option().

void wsvc_rc_stop ( FILE *  out)

Stop the service from servicecontrolmanager, tells OS to stop daemon.

Parameters
out,:debug output printed here (errors). or NULL.

References fatal_win(), and SERVICE_NAME.

Referenced by main(), and wsvc_command_option().

void wsvc_err2str ( char *  str,
size_t  len,
const char *  fixed,
DWORD  err 
)

Convert windows GetLastError() value to a neat string.

Parameters
str,:destination buffer
len,:length of dest buffer
fixed,:fixed text to prepend to string.
err,:the GetLastError() value.

Referenced by fatal_win(), and reportev().