| 98 | } |
| 99 | |
| 100 | COMPtr<IShellLink> createShellLink() |
| 101 | { |
| 102 | void* link = nullptr; |
| 103 | |
| 104 | const auto r = CoCreateInstance(CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER, |
| 105 | IID_IShellLink, &link); |
| 106 | |
| 107 | throwOnFail(r, "failed to create IShellLink instance"); |
| 108 | |
| 109 | if (!link) { |
| 110 | throw ShellLinkException("creating IShellLink worked, pointer is null"); |
| 111 | } |
| 112 | |
| 113 | return COMPtr<IShellLink>(static_cast<IShellLink*>(link)); |
| 114 | } |
| 115 | |
| 116 | COMPtr<IPersistFile> createPersistFile() |
| 117 | { |
nothing calls this directly
no test coverage detected