Functions | Variables
common.c File Reference
#include "service.h"
#include "validate.h"
Include dependency graph for common.c:

Go to the source code of this file.


BOOL openvpn_vswprintf (LPTSTR str, size_t size, LPCTSTR format, va_list arglist)
BOOL openvpn_swprintf (LPTSTR str, size_t size, LPCTSTR format,...)
static DWORD GetRegString (HKEY key, LPCTSTR value, LPTSTR data, DWORD size, LPCTSTR default_value)
DWORD GetOpenvpnSettings (settings_t *s)
LPCTSTR GetLastErrorText ()
DWORD MsgToEventLog (DWORD flags, LPCTSTR format,...)
wchar_t * utf8to16 (const char *utf8)
const wchar_t * get_win_sys_path (void)


LPCTSTR service_instance = TEXT("")
static wchar_t win_sys_path [MAX_PATH]

Function Documentation

◆ get_win_sys_path()

const wchar_t* get_win_sys_path ( void  )

Definition at line 295 of file common.c.

References ASSERT, and win_sys_path.

◆ GetLastErrorText()

LPCTSTR GetLastErrorText ( )

Definition at line 214 of file common.c.

References openvpn_swprintf().

Referenced by CmdInstallServices(), CmdRemoveServices(), CmdStartService(), and MsgToEventLog().

◆ GetOpenvpnSettings()

DWORD GetOpenvpnSettings ( settings_t s)

◆ GetRegString()

static DWORD GetRegString ( HKEY  key,
LPCTSTR  value,
LPTSTR  data,
DWORD  size,
LPCTSTR  default_value 

Definition at line 61 of file common.c.

References M_SYSERR, MsgToEventLog(), openvpn_swprintf(), PACKAGE_NAME, service_instance, and status.

Referenced by GetOpenvpnSettings().

◆ MsgToEventLog()

DWORD MsgToEventLog ( DWORD  flags,
LPCTSTR  format,

◆ openvpn_swprintf()

BOOL openvpn_swprintf ( LPTSTR  str,
size_t  size,
LPCTSTR  format,

Definition at line 47 of file common.c.

References openvpn_vswprintf().

Referenced by GetLastErrorText(), GetOpenvpnSettings(), GetRegString(), and MsgToEventLog().

◆ openvpn_vswprintf()

BOOL openvpn_vswprintf ( LPTSTR  str,
size_t  size,
LPCTSTR  format,
va_list  arglist 

Definition at line 35 of file common.c.

Referenced by MsgToEventLog(), and openvpn_swprintf().

◆ utf8to16()

wchar_t* utf8to16 ( const char *  utf8)

Variable Documentation

◆ service_instance

LPCTSTR service_instance = TEXT("")

◆ win_sys_path

wchar_t win_sys_path[MAX_PATH]

Definition at line 28 of file common.c.

Referenced by get_win_sys_path().