FasterCapObject.SetLogCallback

boolean FasterCapObject.SetLogCallback(IDispatch* callback, BSTR cbName)

Return Value

True if a callback function was set. False if the callback function is reset to default (no callback).

Parameters

callback

Pointer to the client's automation object exposing the callback function. If NULL is passed as argument, the callback will be removed.

cbName

Name of the callback function.

The callback function must have the following prototype:

void cbName(BSTR logString, long color)

logString

The string containing the log text passed back to the client.

color

The color of the string. The color will be black (red 255, green 255, blue 255) for normal messages and red (red 255, green 0, blue 0) for error messages.

Remarks

Call this function to set a callback upon FasterCap log output. That is, when FasterCap has something to log (everything that would normally be visible in FasterCap's console window), the cbName function will be called to notify the client and provide him the output string. This function is especially useful if FasterCap's console window is hidden.

See Also

FasterCap Automation Overview | ShowWindow Method | SetEndCallback Method