MCPcopy Create free account
hub / github.com/MicrosoftEdge/WebView2Browser / GetFilePathAsURI

Method GetFilePathAsURI

BrowserWindow.cpp:937–952  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

935}
936
937std::wstring BrowserWindow::GetFilePathAsURI(std::wstring fullPath)
938{
939 std::wstring fileURI;
940 ComPtr<IUri> uri;
941 DWORD uriFlags = Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME;
942 HRESULT hr = CreateUri(fullPath.c_str(), uriFlags, 0, &uri);
943
944 if (SUCCEEDED(hr))
945 {
946 wil::unique_bstr absoluteUri;
947 uri->GetAbsoluteUri(&absoluteUri);
948 fileURI = std::wstring(absoluteUri.get());
949 }
950
951 return fileURI;
952}
953
954HRESULT BrowserWindow::PostJsonToWebView(web::json::value jsonObj, ICoreWebView2* webview)
955{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected