Last modified: January 16, 2009

Applies to: Office 2010 | Outlook 2010 | Visual Studio

Removes a FNIDLE based idle routine from the MAPI system.

Header file:


Implemented by:


Called by:

Client applications and service providers

VOID DeregisterIdleRoutine(
  FTG ftg


[in] Function tag that identifies the idle routine to be removed.

Any task in a client application or service provider can deregister any idle routine for which it has a valid ftg parameter. In particular, an idle routine can deregister itself.

The following functions deal with the MAPI idle engine and with idle routines based on the FNIDLE function prototype:

Idle routine function



Changes the characteristics of a registered idle routine.


Removes a registered idle routine from the MAPI system.


Disables or re-enables a registered idle routine without removing it from the MAPI system.


Adds an idle routine to the MAPI system, with or without enabling it.


Shuts down the MAPI idle engine for the calling application.


Initializes the MAPI idle engine for the calling application.

   ChangeIdleRoutine, DeregisterIdleRoutine, and EnableIdleRoutine take as an input parameter the function tag returned by FtgRegisterIdleRoutine.

When all foreground tasks for the platform become idle, the MAPI idle engine calls the highest priority idle routine that is ready to execute. There is no guarantee of calling order among idle routines of the same priority.

After the idle routine is deregistered, the idle engine does not call it again. Any implementation that calls DeregisterIdleRoutine must deallocate any memory blocks to which it passed pointers for the idle engine to use in its original call to the FtgRegisterIdleRoutine function.