DavAddConnection function

Creates a secure connection to a WebDAV server or to a remote file or directory on a WebDAV server.

Syntax


DWORD WINAPI DavAddConnection(
  _Inout_  HANDLE  *ConnectionHandle,
  _In_     LPCWSTR RemoteName,
  _In_opt_ LPCWSTR UserName,
  _In_opt_ LPCWSTR Password,
  _In_     PBYTE   ClientCert,
  _In_     DWORD   CertSize
);

Parameters

ConnectionHandle [in, out]

A pointer to a variable that receives the connection handle.

RemoteName [in]

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.

UserName [in, optional]

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.

Password [in, optional]

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.

ClientCert [in]

A pointer to a buffer that contains the client certificate to be used for the connection. The certificate must be in a serialized form.

CertSize [in]

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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Davclnt.h

Library

Netapi32.lib

DLL

Netapi32.dll

See also

CertOpenSystemStore

 

 

Community Additions

ADD
Show: