예제 #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
파일: BalUtil.cs 프로젝트: wixtoolset/wix4
 internal static extern int BalGetVersionVariableFromEngine(
     [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine,
     [MarshalAs(UnmanagedType.LPWStr)] string wzVariable,
     ref StrUtil.StrHandle psczOut
     );
예제 #4
0
파일: BalUtil.cs 프로젝트: wixtoolset/wix4
 internal static extern int BalFormatStringFromEngine(
     [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine,
     [MarshalAs(UnmanagedType.LPWStr)] string wzFormat,
     ref StrUtil.StrHandle psczOut
     );