| 277 | } |
| 278 | |
| 279 | HRESULT callMainProgramImpl(std::wstring_view arg) |
| 280 | { |
| 281 | std::wstring argTransform{arg}; |
| 282 | std::transform(argTransform.begin(), argTransform.end(), argTransform.begin(), [](wchar_t c) { return c == L'\\' ? L'/' : c; }); |
| 283 | auto result = ShellExecute( |
| 284 | NULL, |
| 285 | L"open", |
| 286 | std::format(LR"(fastcopy://"{}"|{})", argTransform, Registry{}.read(L"record")).data(), |
| 287 | nullptr, |
| 288 | nullptr, |
| 289 | SW_SHOW |
| 290 | ); |
| 291 | return S_OK; |
| 292 | } |
| 293 | |
| 294 | IShellItem* m_parent{}; |
| 295 | public: |