OpenVPN
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.

Functions

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)
 

Variables

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 265 of file common.c.

References ASSERT, and win_sys_path.

◆ GetLastErrorText()

LPCTSTR GetLastErrorText ( )

Definition at line 184 of file common.c.

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 
)
static

Definition at line 31 of file common.c.

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

Referenced by GetOpenvpnSettings().

◆ MsgToEventLog()

DWORD MsgToEventLog ( DWORD  flags,
LPCTSTR  format,
  ... 
)

◆ 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]
static

Definition at line 28 of file common.c.

Referenced by get_win_sys_path().