Export (0) Print
Expand All

UrlCreateFromPath function

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

Syntax


HRESULT UrlCreateFromPath(
  _In_     PCTSTR pszPath,
  _Out_    PTSTR pszUrl,
  _Inout_  DWORD *pcchUrl,
  DWORD dwFlags
);

Parameters

pszPath [in]

Type: PCTSTR

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

pszUrl [out]

Type: PTSTR

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

pcchUrl [in, out]

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]

Header

Shlwapi.h

Library

Shlwapi.lib

DLL

Shlwapi.dll (version 5.0 or later)

Unicode and ANSI names

UrlCreateFromPathW (Unicode) and UrlCreateFromPathA (ANSI)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft