mciSetYieldProc

Syntax

WORD FAR mciSetYieldProc(wDeviceID, fpYieldProc, dwYieldData)

This function sets the address of a callback procedure to be called periodically when an MCI device is completing a command specified with the WAIT flag.

Parameters

WORD wDeviceID

Specifies the device ID of the MCI device to which the yield procedure is to be assigned.

YIELDPROC fpYieldProc

Specifies the callback procedure to be called when the given device is yielding. Specify a NULL value to disable any existing yield procedure.

DWORD dwYieldData

Specifies the data sent to the yield procedure when it is called for the given device.

Return Value

Returns TRUE if successful. Returns FALSE for an invalid device ID.

Callback

int FAR PASCAL YieldProc(wDeviceID, dwData)

YieldProc is a placeholder for the application-supplied function name. Export the actual name by including it in the EXPORTS statement in your module-definition file.

Parameters

WORD wDeviceID

Specifies the device ID of the MCI device.

DWORD dwData

Specifies the application-supplied yield data originally supplied in the dwYieldData parameter.

Return Value

Return zero to continue the operation. To cancel the operation, return a nonzero value.

Comments

This call overides any previous yield procedure for this device.