Ejemplo n.º 1
0
        /// <inheritdoc/>
        public string EscapeString(string input)
        {
            StrUtil.StrHandle handle = new StrUtil.StrHandle();
            try
            {
                int ret = BalUtil.BalEscapeStringFromEngine(this.engine, input, ref handle);
                if (ret != NativeMethods.S_OK)
                {
                    throw new Win32Exception(ret);
                }

                return(handle.ToUniString());
            }
            finally
            {
                handle.Dispose();
            }
        }
Ejemplo n.º 2
0
        /// <inheritdoc/>
        public string GetVariableVersion(string name)
        {
            StrUtil.StrHandle handle = new StrUtil.StrHandle();
            try
            {
                int ret = BalUtil.BalGetVersionVariableFromEngine(this.engine, name, ref handle);
                if (ret != NativeMethods.S_OK)
                {
                    throw new Win32Exception(ret);
                }

                return(handle.ToUniString());
            }
            finally
            {
                handle.Dispose();
            }
        }
Ejemplo n.º 3
0
 internal static extern int BalGetVersionVariableFromEngine(
     [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine,
     [MarshalAs(UnmanagedType.LPWStr)] string wzVariable,
     ref StrUtil.StrHandle psczOut
     );
Ejemplo n.º 4
0
 internal static extern int BalFormatStringFromEngine(
     [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine,
     [MarshalAs(UnmanagedType.LPWStr)] string wzFormat,
     ref StrUtil.StrHandle psczOut
     );