Returns the path to the icon to use for this plugin. @return Path to icon file, or an empty string if not specified.
| 151 | // @return Path to icon file, or an empty string if not specified. |
| 152 | // |
| 153 | std::wstring COMPlugin::IconFile() const |
| 154 | { |
| 155 | // Check if plugin supports specifying an icon. Otherwise return an empty string. |
| 156 | std::wstring iconFile; |
| 157 | if (m_cpPluginIcon != nullptr) { |
| 158 | // Ask plugin for an icon file path. |
| 159 | ATL::CComBSTR bstrIconFile; |
| 160 | const HRESULT hRes = m_cpPluginIcon->get_IconFile(&bstrIconFile); |
| 161 | if (SUCCEEDED(hRes) && bstrIconFile != nullptr) { |
| 162 | iconFile = (LPWSTR) bstrIconFile; |
| 163 | } |
| 164 | } |
| 165 | return iconFile; |
| 166 | } |
| 167 | |
| 168 | // |
| 169 | // Determines if we should use the default icon for this plugin. |
nothing calls this directly
no test coverage detected