简体   繁体   English

在 Win32 应用程序中,如何检索应用程序类别信息

[英]In a Win32 app, how to retrieve app category information

I am writing a Win32 app to monitor current process usage, and I hope my program is able to identify and categorise the app automatically.我正在编写一个 Win32 应用程序来监控当前进程的使用情况,我希望我的程序能够自动识别和分类该应用程序。 However, I cannot find any library to use in GitHub, and it seems like the Windows doesn't provide this kind of API.但是,我找不到在 GitHub 中使用的任何库,而且似乎 Windows 不提供这种 API。 The only way I can think of is manually enter each app category into the database, but it seems overwhelming for users to manage all of his applications.我能想到的唯一方法是将每个应用程序类别手动输入到数据库中,但是对于用户来说管理他的所有应用程序似乎是压倒性的。 Any suggestions?有什么建议么?

This is overkill, but an answer I suppose.这是矫枉过正,但我想一个答案。 Make a text file, a local copy of which will be available and used by your app.制作一个文本文件,其本地副本将可供您的应用使用和使用。 The text file maps executable names to program categories.文本文件将可执行文件名称映射到程序类别。

Now, for auto-update of the mapping, put the shared master of this text file on "the cloud" - eg Google Docs.现在,为了自动更新映射,将此文本文件的共享主文件放在“云”上 - 例如 Google Docs。 You could allow specific others to modify it, or just you.您可以允许特定的其他人修改它,或者只允许您修改它。 When the program starts, and then every hour or so, it opens that cloud text file for read only.当程序启动时,然后每隔一小时左右,它会以只读方式打开该云文本文件。 Get the contents to see if the local copy needs to be superseded.获取内容,看看是否需要替换本地副本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM