MFCreatePathFromURL function

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

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

Syntax

HRESULT MFCreatePathFromURL(
  _In_opt_ LPCWSTR pwszFileURL,
  _Out_    LPWSTR  *ppwszFilePath
);

Parameters

pwszFileURL [in, optional]

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

ppwszFilePath [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_OK
The function succeeded.
E_INVALIDARG
Invalid argument. The string given in the pwszFileURL parameter cannot be converted to a path.

 

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