ClearBox Server™ v1.2 Developer's Guide

ICommonExtender::RequestTimerCall

Called by server to request whether extension needs to receive calls on timer. If extension needs to perform some task periodically, it should make use of this method.

HRESULT RequestTimerCall(
	[in,out] unsigned long * secsInterval);

Parameters

secsInterval
[in,out] If extension returns S_OK, this parameter must be set to the time interval value between calls in seconds. The calls will be made by server calling ICommonExtender::TimerCall method.

Return Values

Extension must return S_OK if it needs to receive calls and secsInterval is set to appropriate value, S_FALSE or any error code otherwise.

Thread Safety

This method is called in context of SCHEDULE thread. (See Server Threads Model for details.) You should synchronize data which is shared with other threads.

Remarks

If extension returns value other than S_OK, secsInterval is ignored

Example Code

After this code execution ICommonExtender::TimerCall will be called every 10 seconds

STMETHODIMP CTest::RequestTimerCall (unsigned long * secsInterval)
{
	*secsInterval=10;
	return S_OK;
}

See Also

ICommonExtender, ICommonExtender::TimerCall


© 2001-2003 XPerience Technologies. www.xperiencetech.com

Created by chm2web html help conversion utility.