DavCancelConnectionsToServer function (davclnt.h)
Closes all connections to a WebDAV server or a remote file or directory on a WebDAV server.
Syntax
DWORD DavCancelConnectionsToServer(
[in] LPWSTR lpName,
BOOL fForce
);
Parameters
[in] lpName
Pointer to a null-terminated Unicode string that contains the name of the remote file or server. This string must be in one of the following formats:
- http://server/path
- \\server\path
- server
fForce
A Boolean value that specifies whether the connection should be closed if there are open files. Set this parameter to FALSE if the connection should be closed only if there are no open files. Set this parameter to TRUE if the connection should be closed even if there are open files.
Return value
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a system error code or network error code such as one of the following values.
Return code | Description |
---|---|
|
The lpName parameter contained a value that was not valid. |
|
The lpName parameter contained a value that was not a valid remote file name. |
|
No connections to the remote file or server were found. |
|
There are open files on the connection, and fForce parameter was set to FALSE. |
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 | Davclnt.lib |
DLL | Davclnt.dll |