2 out of 4 rated this helpful - Rate this topic

UrlCreateFromPath function

Applies to: desktop apps only

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

Minimum supported server

Windows 2000 Server

Header

Shlwapi.h

Library

Shlwapi.lib

DLL

Shlwapi.dll (version 5.0 or later)

Unicode and ANSI names

UrlCreateFromPathW (Unicode) and UrlCreateFromPathA (ANSI)

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ