OpenVPN
|
Go to the source code of this file.
Data Structures | |
struct | openvpnmsica_thread_data |
Thread local storage data. More... | |
Macros | |
#define | ERROR_MSICA 2550L |
#define | ERROR_MSICA_ERRNO 2551L |
#define | OPENVPNMSICA_SAVE_MSI_SESSION(hInstall) |
Set MSI session handle in thread local storage. More... | |
#define | DLLEXP_DECL |
#define | DLLEXP_EXPORT "/EXPORT:" __FUNCTION__ "=" __FUNCDNAME__ |
Functions | |
DLLEXP_DECL UINT __stdcall | FindSystemInfo (_In_ MSIHANDLE hInstall) |
Determines Windows information: More... | |
DLLEXP_DECL UINT __stdcall | CloseOpenVPNGUI (_In_ MSIHANDLE hInstall) |
Find OpenVPN GUI window and send it a WM_CLOSE message. More... | |
DLLEXP_DECL UINT __stdcall | StartOpenVPNGUI (_In_ MSIHANDLE hInstall) |
Launches OpenVPN GUI. More... | |
DLLEXP_DECL UINT __stdcall | EvaluateTUNTAPAdapters (_In_ MSIHANDLE hInstall) |
Evaluate the TUNTAPAdapter table of the MSI package database and prepare a list of TAP adapters to install/remove. More... | |
DLLEXP_DECL UINT __stdcall | ProcessDeferredAction (_In_ MSIHANDLE hInstall) |
Perform scheduled deferred action. More... | |
DLLEXP_DECL UINT __stdcall | CheckAndScheduleReboot (_In_ MSIHANDLE hInstall) |
Schedule reboot after installation if reboot indication file is found in user's temp directory. More... | |
Variables | |
DWORD | openvpnmsica_thread_data_idx |
MSI session handle thread local storage index. More... | |
#define DLLEXP_DECL |
Definition at line 72 of file openvpnmsica.h.
#define DLLEXP_EXPORT "/EXPORT:" __FUNCTION__ "=" __FUNCDNAME__ |
Definition at line 73 of file openvpnmsica.h.
#define ERROR_MSICA 2550L |
Definition at line 32 of file openvpnmsica.h.
#define ERROR_MSICA_ERRNO 2551L |
Definition at line 33 of file openvpnmsica.h.
#define OPENVPNMSICA_SAVE_MSI_SESSION | ( | hInstall | ) |
Set MSI session handle in thread local storage.
Definition at line 54 of file openvpnmsica.h.
DLLEXP_DECL UINT __stdcall CheckAndScheduleReboot | ( | _In_ MSIHANDLE | hInstall | ) |
Schedule reboot after installation if reboot indication file is found in user's temp directory.
hInstall | Handle to the installation provided to the DLL custom action |
Definition at line 1163 of file openvpnmsica.c.
References debug_popup, FILE_NEED_REBOOT, M_WARN, msg, and OPENVPNMSICA_SAVE_MSI_SESSION.
DLLEXP_DECL UINT __stdcall CloseOpenVPNGUI | ( | _In_ MSIHANDLE | hInstall | ) |
Find OpenVPN GUI window and send it a WM_CLOSE message.
hInstall | Handle to the installation provided to the DLL custom action |
Definition at line 338 of file openvpnmsica.c.
References debug_popup.
DLLEXP_DECL UINT __stdcall EvaluateTUNTAPAdapters | ( | _In_ MSIHANDLE | hInstall | ) |
Evaluate the TUNTAPAdapter table of the MSI package database and prepare a list of TAP adapters to install/remove.
hInstall | Handle to the installation provided to the DLL custom action |
Definition at line 634 of file openvpnmsica.c.
References debug_popup, M_ERRNO, M_NONFATAL, msg, msi_format_field(), msi_get_record_string(), msica_arg_seq_add_tail(), msica_arg_seq_free(), msica_arg_seq_init(), OPENVPNMSICA_SAVE_MSI_SESSION, PRIsLPTSTR, schedule_adapter_create(), schedule_adapter_delete(), and setup_sequence().
DLLEXP_DECL UINT __stdcall FindSystemInfo | ( | _In_ MSIHANDLE | hInstall | ) |
Determines Windows information:
OPENVPNSERVICE
MSI property to PID of OpenVPN Service if running, or its EXE path if configured for auto-start.hInstall | Handle to the installation provided to the DLL custom action |
Definition at line 301 of file openvpnmsica.c.
References debug_popup, find_adapters(), OPENVPNMSICA_SAVE_MSI_SESSION, and TAP_WIN_COMPONENT_ID.
DLLEXP_DECL UINT __stdcall ProcessDeferredAction | ( | _In_ MSIHANDLE | hInstall | ) |
Perform scheduled deferred action.
hInstall | Handle to the installation provided to the DLL custom action |
Definition at line 963 of file openvpnmsica.c.
References cleanup(), CreateRebootFile(), debug_popup, tap_adapter_node::guid, M_ERRNO, M_NONFATAL, msg, msi_get_string(), MSICA_ADAPTER_TICK_SIZE, OPENVPNMSICA_SAVE_MSI_SESSION, parse_guid(), tap_adapter_node::pNext, tap_adapter_node::szName, tap_create_adapter(), tap_delete_adapter(), tap_enable_adapter(), tap_free_adapter_list(), tap_list_adapters(), and tap_set_adapter_name().
DLLEXP_DECL UINT __stdcall StartOpenVPNGUI | ( | _In_ MSIHANDLE | hInstall | ) |
Launches OpenVPN GUI.
It's path is obtained by expanding the [#bin.openvpn_gui.exe]
therefore, its Id field in File table must be "bin.openvpn_gui.exe".
hInstall | Handle to the installation provided to the DLL custom action |
Definition at line 361 of file openvpnmsica.c.
References debug_popup, M_ERRNO, M_FATAL, M_NONFATAL, msg, and OPENVPNMSICA_SAVE_MSI_SESSION.
DWORD openvpnmsica_thread_data_idx |
MSI session handle thread local storage index.
Definition at line 38 of file dllmain.c.
Referenced by DllMain(), and x_msg_va().