MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / createShellLink

Method createShellLink

src/envshortcut.cpp:100–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 1

ShellLinkExceptionClass · 0.85

Tested by

no test coverage detected