WdsCliLog function (wdsclientapi.h)

Sends a log event to the WDS server.

Syntax

HRESULT WDSCLIAPI WdsCliLog(
  [in] HANDLE hSession,
  [in] ULONG  ulLogLevel,
  [in] ULONG  ulMessageCode,
       ...    
);

Parameters

[in] hSession

A handle to a session with a WDS server. This was a handle returned by the WdsCliCreateSession function.

[in] ulLogLevel

Indicates the threshold severity required to log an event. The WDS server will log events only if the server log level is greater than or equal to the value specified.

This parameter can have one of the following values.

WDS_LOG_LEVEL_DISABLED (0)

WDS_LOG_LEVEL_ERROR (1)

WDS_LOG_LEVEL_WARNING (2)

WDS_LOG_LEVEL_INFO (3)

[in] ulMessageCode

The type of message that is being logged.

Value Meaning
WDS_LOG_TYPE_CLIENT_ERROR
1
A client error message. An additional parameter of type PWSTR that describes the error is required.
WDS_LOG_TYPE_CLIENT_STARTED
2
A client started message. No additional parameters are required.
WDS_LOG_TYPE_CLIENT_FINISHED
3
A client finished message. No additional parameters are required.
WDS_LOG_TYPE_CLIENT_IMAGE_SELECTED
4
A client image selected message. Two additional parameters of type PWSTR are required. The first is the Image Name and the second is the Group Name.
WDS_LOG_TYPE_CLIENT_APPLY_STARTED
5
No additional parameters are required.
WDS_LOG_TYPE_CLIENT_APPLY_FINISHED
6
No additional parameters are required.
WDS_LOG_TYPE_CLIENT_GENERIC_MESSAGE
7
A generic message. An additional parameter of type PWSTR that contains the message is required.
WDS_LOG_TYPE_CLIENT_MAX_CODE
8
Used to determine an out-of-range index. Values greater than or equal to WDS_LOG_TYPE_CLIENT_MAX_CODE are not valid.

...

The quantity and type of the additional arguments varies with the value of the ulMessageCode parameter.

Return value

If the function succeeds, the return is S_OK.

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

See also

WdsCliCreateSession

Windows Deployment Services Client Functions