我现在一个做了一个钩子,请问一个怎么去监控最近打开的应该程序呢???
原理
谢谢

解决方案 »

  1.   

    啊?获得最近打开的程序关钩子什么事情用SHAddToRecentDocs这个Shell API就可以了。通知系统一个条目已经访问过,目的是跟踪那些最近使用和使用最频繁的条目。该函数也可以用于清除所有使用数据。
    void SHAddToRecentDocs(          
    UINT uFlags,    
    LPCVOID pv);
    uFlags 
    [in] 
    一个来自SHARD枚举的值,它标识着由pv参数指定的信息的格式。 pv 
    [in] 一个指向数据的指针,该数据标识着已经被访问过的条目。条目可以由该参数的下列形式指定:一个NULL结尾的字符串,该字符串包含了条目的路径和文件名。 
    A pointer to an item identifier list (PIDL) that identifies the item's file object. 
    Windows 7 and later only. A SHARDAPPIDINFO, SHARDAPPIDINFOIDLIST, or SHARDAPPIDINFOLINK structure that identifies the item through an Application User Model ID (AppUserModelID). See Application User Model IDs (AppUserModelIDs) for more information. 
    Windows 7 and later only. An IShellLink object that identifies the item through a shortcut. 
    如果要清除所有使用数据,可以将该参数设置NULL。