RegisterDelayedBootWork (Compact 2013)

3/28/2014

This function registers work items that need to be completed after the device has been booted. The system can then complete these items when it is idle.

Syntax

HRESULT RegisterDelayedBootWork(
    DWORD dwGroup,
    DWORD dwOffset,
    DWORD dwFlags,
    __deref_out HANDLE phWaitEvent,
    __deref_opt_out DWORD*  pdwCompletionToken
)

Parameters

  • dwGroup
    The group to which this work belongs. This value determines the order in which the work items are signaled. See the Remarks section for more information.
  • dwOffset
    The priority of the work item within the group. This value should be 0.
  • dwFlags
    Not used.
  • phWaitEvent
    [out]The pointer that will receive an event. Your application should wait on this event and do the delayed work when it is signaled.
  • pdwCompletionToken
    [out] The token received. Use this token when you call DelayedBootWorkComplete to notify the system that the work is complete.

Return Value

If successful, this function returns S_OK.

Remarks

Use one of the following values for the dwGroup parameter.

  • DBW_DRIVER_GROUP_1
  • DBW_DRIVER_GROUP_2
  • DBW_WINDOWS_STARTUP_GROUP
  • DBW_GENERAL_GROUP_2
  • DBW_GENERAL_GROUP_3

You use the value of dwGroup to specify the order in which the work items are signaled. The home screen loads its plugins in the DBW_WINDOWS_STARTUP_GROUP. If your application needs to write a system state or registry setting that a plugin or application needs to read, you should use a group before the DBW_WINDOWS_STARTUP_GROUP. If your application reads a system state or registry setting, you should use a group after the DBW_WINDOWS_STARTUP_GROUP.

Your application should wait until the event specified in phWaitEvent is signaled.

Requirements

Header

delayedbootwork.h

See Also

Reference

Kernel Functions
DelayedBootWorkComplete