获取已安装的应用程序列表Windows Mobile(受C#托管) [英] Get List of Installed Applications Windows Mobile (C# Managed)

查看:55
本文介绍了获取已安装的应用程序列表Windows Mobile(受C#托管)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用C#获取Windows Mobile上已安装应用程序的列表.

I need to get List of Installed Application on Windows Mobile using C#.

之后,我希望能够在安装的应用程序启动,结束等时获取通知.

After that, I want to have capability to get notifications when installed application starts, ends etc.

推荐答案

通过wceload安装应用程序(这是典型的安装路径)后,会在此处的注册表中添加一个条目:

When an app is installed by wceload, which is the typical install route, then an entry gets added in the registry here:

[HKEY_LOCAL_MACHINE\Software\Apps]

因此,您可以在此处枚举键和值,以确定安装了什么以及文件系统在文件系统中的驻留位置.

So you can enumerate keys and values here to determine what is installed and where in the file system it resides.

在应用启动时获取通知要困难得多,因为该系统并非旨在告诉您这一点.我可能会选择使用 Toolhelp API 定期枚举正在运行的进程以确定什么是新的或不存在的.Microsoft不提供Toolhelp实施,但是P/Invoke相当容易,或者您可以使用已经完成的SDF之类的东西.

Getting a notification when an app starts is much, much more difficult because the system simply isn't designed to tell you that. The route I'd likely go is to use the Toolhelp API to periodically enumerate the running processes to determine what is new or gone. Microsoft does not provide a Toolhelp implementation, but it's fairly easy to P/Invoke, or you can use something like the SDF, which already has it done.

这篇关于获取已安装的应用程序列表Windows Mobile(受C#托管)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆