Пример #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();
            }
        }
Пример #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();
            }
        }
Пример #3
0
 internal static extern int BalGetVersionVariableFromEngine(
     [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine,
     [MarshalAs(UnmanagedType.LPWStr)] string wzVariable,
     ref StrUtil.StrHandle psczOut
     );
Пример #4
0
 internal static extern int BalFormatStringFromEngine(
     [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine,
     [MarshalAs(UnmanagedType.LPWStr)] string wzFormat,
     ref StrUtil.StrHandle psczOut
     );