确定与URI方案关联的默认图标

时间:2016-02-26 15:28:04

标签: c++ windows winapi uri

我找到了register an application to an URI scheme的方法。其中的示例显示了假设alert协议的以下注册表结构:

HKEY_CLASSES_ROOT
   alert
      (Default) = "URL:Alert Protocol"
      URL Protocol = ""
      DefaultIcon
         (Default) = "alert.exe,1"
      shell
         open
            command
               (Default) = "C:\Program Files\Alert\alert.exe" "%1"

有一个DefaultIcon条目,我想查询给定的URI方案。但是,我发现没有API支持此功能。

如果我将URI作为字符串给出,如何在Win32中找到关联的默认图标,而不是自己走过注册表?

1 个答案:

答案 0 :(得分:0)

SHGetFileInfo() API适用于文件扩展名(使用app.controller('GalleryController', function(){ this.current = 0; this.setCurrent = function(checkCurrent) { this.current = checkCurrent || 0; }; }); 标志),但它似乎不适用于协议。结束了登记。