UrlCreateFromPathA function

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

Syntax

LWSTDAPI UrlCreateFromPathA(
  PCSTR pszPath,
  PSTR  pszUrl,
  DWORD *pcchUrl,
  DWORD dwFlags
);

Parameters

pszPath

Type: PCTSTR

A null-terminated string of maximum length INTERNET_MAX_URL_LENGTH that contains the MS-DOS path.

pszUrl

Type: PTSTR

A pointer to a buffer that, when this function returns successfully, receives the URL.

pcchUrl

Type: DWORD*

The number of characters in pszUrl.

dwFlags

Type: DWORD

Reserved. Set this parameter to NULL.

Return Value

Type: HRESULT

Returns S_FALSE if pszPath is already in URL format. In this case, pszPath will simply be copied to pszUrl. Otherwise, it returns S_OK if successful or a standard COM error value if not.

Remarks

Note  UrlCreateFromPath does not support extended paths. These are paths that include the extended-length path prefix "\\?\".
 

Requirements

   
Minimum supported client Windows 2000 Professional, Windows XP [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header shlwapi.h
Library Shlwapi.lib
DLL Shlwapi.dll (version 5.0 or later)