From 3d2d46f62fc01e2653d0251ad9703090574e7c41 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 6 Mar 2024 14:48:10 -0800 Subject: Better .nupkg names --- .../BalUtil.cs | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/BalUtil.cs (limited to 'src/api/burn/WixToolset.BootstrapperApplicationApi/BalUtil.cs') 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 @@ +// 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. + +namespace WixToolset.BootstrapperApplicationApi +{ + using System; + using System.Runtime.InteropServices; + + internal static class BalUtil + { + [DllImport("mbanative.dll", ExactSpelling = true)] + internal static extern int BalEscapeStringFromEngine( + [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, + [MarshalAs(UnmanagedType.LPWStr)] string wzIn, + ref StrUtil.StrHandle psczOut + ); + + [DllImport("mbanative.dll", ExactSpelling = true)] + internal static extern int BalFormatStringFromEngine( + [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, + [MarshalAs(UnmanagedType.LPWStr)] string wzFormat, + ref StrUtil.StrHandle psczOut + ); + + [DllImport("mbanative.dll", ExactSpelling = true)] + internal static extern int BalGetStringVariableFromEngine( + [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, + ref StrUtil.StrHandle psczOut + ); + + [DllImport("mbanative.dll", ExactSpelling = true)] + internal static extern int BalGetVersionVariableFromEngine( + [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, + ref StrUtil.StrHandle psczOut + ); + + [DllImport("mbanative.dll", ExactSpelling = true)] + internal static extern int BalGetRelatedBundleVariableFromEngine( + [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, + ref StrUtil.StrHandle psczOut + ); + + [DllImport("mbanative.dll", ExactSpelling = true)] + [return: MarshalAs(UnmanagedType.Bool)] + internal static extern bool BalVariableExistsFromEngine( + [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable + ); + } +} -- cgit v1.2.3-55-g6feb