WdsCliCreateSession function (wdsclientapi.h)
Starts a new session with a WDS server.
Syntax
HRESULT WDSCLIAPI WdsCliCreateSession(
[in] PWSTR pwszServer,
[in, optional] PWDS_CLI_CRED pCred,
[out] PHANDLE phSession
);
Parameters
[in] pwszServer
A pointer to a string value that contains the name or IP address of the WDS server.
[in, optional] pCred
A pointer to a WDS_CLI_CRED structure that contains the client's credentials. This parameter can be null for a session without authentication.
[out] phSession
A pointer to a handle for the new session. This parameter is unmodified if the function is unsuccessful.
Return value
If the function succeeds, the return value is TRUE.
If the function fails, the return value is FALSE. To get extended error information, call GetLastError.
Remarks
To close the session and release resources, use the WdsCliClose function.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | wdsclientapi.h |
Library | WdsClientAPI.lib |
DLL | WdsClientAPI.dll |