windows mobile ,wince 系统,用代码启动cab文件安装
2021-04-09 00:26
标签:void tco system dllimport point machine .net mars curd 有时候需要用代码来启动安装cab,以下是代码。不能实现静默安装。 启动后会提示用户是否安装,需要用户点击是才行。 windows mobile ,wince 系统,用代码启动cab文件安装 标签:void tco system dllimport point machine .net mars curd 原文地址:https://www.cnblogs.com/Jerseyblog/p/9076436.htmlusing System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.IO;
using System.Diagnostics;
using System.Windows.Forms;
public class BLLInstallCab
{
#region Const
private const int STILL_ACTIVE = 0x103;
#endregion
#region P/Invoke
[DllImport("coredll.dll", EntryPoint = "CreateProcess", SetLastError = true)]
private static extern bool CreateProcess(string pszImageName, string pszCmdLine, IntPtr psaProcess, IntPtr psaThread, int fInheritHandles, int fdwCreate, IntPtr pvEnvironment, IntPtr pszCurDir, IntPtr psiStartInfo, ProcessInfo pi);
[DllImport("coredll.dll", SetLastError = true)]
private static extern bool GetExitCodeProcess(int hProcess, ref int lpExitCode);
#endregion
public sealed class ProcessInfo
{
public IntPtr hProcess = IntPtr.Zero;
public IntPtr hThread = IntPtr.Zero;
public int dwProcessID = 0;
public int dwThreadID = 0;
}
///
文章标题:windows mobile ,wince 系统,用代码启动cab文件安装
文章链接:http://soscw.com/index.php/essay/73093.html