PFN_WdsCliCallback callback function (wdsclientapi.h)

Defines a callback function that WDS can call for progress notification and error messages during a file or image transfer.

Syntax

PFN_WdsCliCallback PfnWdsclicallback;

void PfnWdsclicallback(
  [in]           DWORD dwMessageId,
  [in, optional] WPARAM wParam,
  [in, optional] LPARAM lParam,
  [in, optional] PVOID pvUserData
)
{...}

Parameters

[in] dwMessageId

The type of message and the meaning of the lParam parameter.

This parameter can have only one of the following values.

Value Meaning
WDS_CLI_MSG_START
0
The transfer start message. The lParam parameter is a pointer to a LARGE_INTEGER value containing the file size of the transfer.
WDS_CLI_MSG_COMPLETE
1
The transfer complete message. The lParam parameter is an HRESULT value.
WDS_CLI_MSG_PROGRESS
2
The transfer progress message. The lParam parameter is a ULONG value that is the percentage of transfer completed.
WDS_CLI_MSG_TEXT
3
The informational message. The lParam parameter is pointer to a debugging string that can be used for diagnostic purposes.

[in, optional] wParam

This message parameter should always be set to the value of the transfer handle returned by the WdsCliTransferImage or WdsCliTransferFile function.

[in, optional] lParam

The meaning of the value contained by this parameter depends upon the dwMessageId parameter.

[in, optional] pvUserData

A pointer to optional user information attached to this session by the WdsCliTransferImage or WdsCliTransferFile function.

Return value

None

Remarks

A callback function can call the WdsCliCancelTransfer function to cancel a transfer. Although a callback function can also call the WdsCliWaitForTransfer function, this is not recommended because no additional callbacks will be received until the current callback is unblocked.

Requirements

Requirement Value
Minimum supported client Windows Vista with SP1 [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header wdsclientapi.h