DavAddConnection function (davclnt.h)
Creates a secure connection to a WebDAV server or to a remote file or directory on a WebDAV server.
Syntax
DWORD DavAddConnection(
[in, out] HANDLE *ConnectionHandle,
[in] LPCWSTR RemoteName,
[in, optional] LPCWSTR UserName,
[in, optional] LPCWSTR Password,
[in] PBYTE ClientCert,
[in] DWORD CertSize
);
Parameters
[in, out] ConnectionHandle
A pointer to a variable that receives the connection handle.
[in] RemoteName
A pointer to a null-terminated Unicode string that contains the path to the remote file or directory. This string must begin with the "https://" prefix.
[in, optional] UserName
A pointer to a null-terminated Unicode string that contains the user name to be used for the connection. This parameter is optional and can be NULL.
[in, optional] Password
A pointer to a null-terminated Unicode string that contains the password to be used for the connection. This parameter is optional and can be NULL.
[in] ClientCert
A pointer to a buffer that contains the client certificate to be used for the connection. The certificate must be in a serialized form.
[in] CertSize
Size, in bytes, of the client certificate.
Return value
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a system error code.
Remarks
To close the connection, use the DavDeleteConnection function.
Use this function when you are connecting to a WebDAV server using the Secure Sockets Layer (SSL) protocol and therefore must specify a certificate. To connect to a WebDAV server without specifying a certificate, use a Windows networking function such as WNetAddConnection2 or WNetAddConnection3.
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 |