MFCreateURLFromPath function

[This API is not supported and may be altered or unavailable in the future. Instead, Applications should call UrlCreateFromPath.]

Converts a Microsoft MS-DOS path to a canonicalized URL.

Syntax

HRESULT MFCreateURLFromPath(
  _In_opt_ LPCWSTR pwszFilePath,
  _Out_    LPWSTR  *ppwszFileURL
);

Parameters

pwszFilePath [in, optional]

A null-terminated string that contains the path. The maximum length of the string is INTERNET_MAX_URL_LENGTH.

ppwszFileURL [out]

Receives a null-terminated string that contains the URL. The caller must free the string by calling CoTaskMemFree.

Return value

The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_FALSE
The string given in the pwszFilePath parameter is already in URL format. In this case, pszFilePath is simply copied to ppszFileURL without modification.
S_OK
The function succeeded.

 

Remarks

This function has no associated import library. To call this function, you must use the LoadLibrary and GetProcAddress functions to dynamically link to Mfplat.dll.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
DLL
Mfplat.dll

See also

Media Foundation Functions