MCPcopy Create free account
hub / github.com/MicrosoftEdge/WebView2Samples / GetLocalUri

Method GetLocalUri

SampleApps/WebView2SampleWinComp/AppWindow.cpp:214–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214std::wstring AppWindow::GetLocalUri(std::wstring relativePath)
215{
216 std::wstring path = GetLocalPath(relativePath, false);
217
218 wil::com_ptr<IUri> uri;
219 CHECK_FAILURE(CreateUri(path.c_str(), Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME, 0, &uri));
220
221 wil::unique_bstr uriBstr;
222 CHECK_FAILURE(uri->GetAbsoluteUri(&uriBstr));
223 return std::wstring(uriBstr.get());
224}
225
226std::wstring AppWindow::GetLocalPath(std::wstring relativePath, bool keep_exe_path)
227{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected