Export (0) Print
Expand All
2 out of 4 rated this helpful - Rate this topic

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)

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.