OpenVPN
msica_arg.h
Go to the documentation of this file.
1/*
2 * openvpnmsica -- Custom Action DLL to provide OpenVPN-specific support to MSI packages
3 * https://community.openvpn.net/openvpn/wiki/OpenVPNMSICA
4 *
5 * Copyright (C) 2018-2025 Simon Rozman <simon@rozman.si>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2
9 * as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, see <https://www.gnu.org/licenses/>.
18 */
19
20#ifndef MSICA_ARG_H
21#define MSICA_ARG_H
22
23#include <windows.h>
24#include <wchar.h>
25#include "../tapctl/basic.h"
26
27
28#ifdef _MSC_VER
29#pragma warning(push)
30#pragma warning(disable : 4200) /* Using zero-sized arrays in struct/union. */
31#endif
32
33
38{
39 struct msica_arg *next;
40 WCHAR val[];
41};
42
43
48{
49 struct msica_arg *head;
50 struct msica_arg *tail;
51};
52
53
60
61
68
69
77void msica_arg_seq_add_head(_Inout_ struct msica_arg_seq *seq, _In_z_ LPCWSTR argument);
78
79
87void msica_arg_seq_add_tail(_Inout_ struct msica_arg_seq *seq, _Inout_ LPCWSTR argument);
88
96LPWSTR
97msica_arg_seq_join(_In_ const struct msica_arg_seq *seq);
98
99#ifdef _MSC_VER
100#pragma warning(pop)
101#endif
102
103#endif /* ifndef MSICA_ARG_H */
void msica_arg_seq_free(_Inout_ struct msica_arg_seq *seq)
Frees argument sequence.
Definition msica_arg.c:41
void msica_arg_seq_init(_Inout_ struct msica_arg_seq *seq)
Initializes argument sequence.
Definition msica_arg.c:33
void msica_arg_seq_add_tail(_Inout_ struct msica_arg_seq *seq, _Inout_ LPCWSTR argument)
Appends argument to the end of the argument sequence.
Definition msica_arg.c:74
void msica_arg_seq_add_head(_Inout_ struct msica_arg_seq *seq, _In_z_ LPCWSTR argument)
Inserts argument to the beginning of the argument sequence.
Definition msica_arg.c:54
LPWSTR msica_arg_seq_join(_In_ const struct msica_arg_seq *seq)
Join arguments of the argument sequence into a space delimited string.
Definition msica_arg.c:91
Argument sequence.
Definition msica_arg.h:48
struct msica_arg * head
Pointer to the first argument in the sequence.
Definition msica_arg.h:49
struct msica_arg * tail
Pointer to the last argument in the sequence.
Definition msica_arg.h:50
Argument list.
Definition msica_arg.h:38
struct msica_arg * next
Pointer to the next argument in the sequence.
Definition msica_arg.h:39
WCHAR val[]
Zero terminated argument string.
Definition msica_arg.h:40
#define _Inout_
Definition basic.h:50
#define _In_z_
Definition basic.h:47
#define _In_
Definition basic.h:41