DavGetHTTPFromUNCPath function (davclnt.h)
Converts the specified UNC path to an equivalent HTTP path.
Syntax
DWORD DavGetHTTPFromUNCPath(
[in] LPCWSTR UncPath,
[out] LPWSTR Url,
[in, out] LPDWORD lpSize
);
Parameters
[in] UncPath
A pointer to a null-terminated Unicode string that contains the UNC path. This path must be in the following format:
\\server[@SSL][@port][\path]
where
- server is the server name.
- @SSL is optional and indicates a request for an SSL connection.
- port is an optional port number. The standard ports are 80 for http and 443 for https (SSL).
- path is optional and specifies a path to a remote file or directory on the server.
[out] Url
A pointer to a caller-allocated buffer that receives the HTTP path as a null-terminated Unicode string.
[in, out] lpSize
A pointer to a variable that on input specifies the maximum size, in Unicode characters, of the buffer that the HttpPath parameter points to. If the function succeeds, on output the variable receives the number of characters that were copied into the buffer. If the function fails with ERROR_INSUFFICIENT_BUFFER, on output the variable receives the number of characters needed to store the HTTP path, including the "http://" or "https://" prefix and the terminating NULL character.
Return value
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a system error code, such as the following value.
Return code | Description |
---|---|
|
The buffer that the HttpPath parameter points to was not large enough to store the HTTP path. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | davclnt.h |
Library | Netapi32.lib |
DLL | Netapi32.dll |