diff options
Diffstat (limited to 'src/api/burn/WixToolset.BootstrapperApplicationApi/BalUtil.cs')
-rw-r--r-- | src/api/burn/WixToolset.BootstrapperApplicationApi/BalUtil.cs | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/BalUtil.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/BalUtil.cs new file mode 100644 index 00000000..25257554 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/BalUtil.cs | |||
@@ -0,0 +1,53 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.BootstrapperApplicationApi | ||
4 | { | ||
5 | using System; | ||
6 | using System.Runtime.InteropServices; | ||
7 | |||
8 | internal static class BalUtil | ||
9 | { | ||
10 | [DllImport("mbanative.dll", ExactSpelling = true)] | ||
11 | internal static extern int BalEscapeStringFromEngine( | ||
12 | [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, | ||
13 | [MarshalAs(UnmanagedType.LPWStr)] string wzIn, | ||
14 | ref StrUtil.StrHandle psczOut | ||
15 | ); | ||
16 | |||
17 | [DllImport("mbanative.dll", ExactSpelling = true)] | ||
18 | internal static extern int BalFormatStringFromEngine( | ||
19 | [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, | ||
20 | [MarshalAs(UnmanagedType.LPWStr)] string wzFormat, | ||
21 | ref StrUtil.StrHandle psczOut | ||
22 | ); | ||
23 | |||
24 | [DllImport("mbanative.dll", ExactSpelling = true)] | ||
25 | internal static extern int BalGetStringVariableFromEngine( | ||
26 | [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, | ||
27 | [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, | ||
28 | ref StrUtil.StrHandle psczOut | ||
29 | ); | ||
30 | |||
31 | [DllImport("mbanative.dll", ExactSpelling = true)] | ||
32 | internal static extern int BalGetVersionVariableFromEngine( | ||
33 | [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, | ||
34 | [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, | ||
35 | ref StrUtil.StrHandle psczOut | ||
36 | ); | ||
37 | |||
38 | [DllImport("mbanative.dll", ExactSpelling = true)] | ||
39 | internal static extern int BalGetRelatedBundleVariableFromEngine( | ||
40 | [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, | ||
41 | [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, | ||
42 | [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, | ||
43 | ref StrUtil.StrHandle psczOut | ||
44 | ); | ||
45 | |||
46 | [DllImport("mbanative.dll", ExactSpelling = true)] | ||
47 | [return: MarshalAs(UnmanagedType.Bool)] | ||
48 | internal static extern bool BalVariableExistsFromEngine( | ||
49 | [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, | ||
50 | [MarshalAs(UnmanagedType.LPWStr)] string wzVariable | ||
51 | ); | ||
52 | } | ||
53 | } | ||