次の方法で共有


MAPIInitIdle

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Initializes the MAPI idle engine for the calling application.

Header file:

Mapiutil.h

Implemented by:

MAPI

Called by:

Client applications and service providers

LONG MAPIInitIdle(
  LPVOID lpvReserved
);

Parameters

  • lpvReserved
    [in] Reserved; must be zero.

Return Value

The MAPIInitIdle function returns zero if initialization is successful, and 1 otherwise. If MAPIInitIdle is called multiple times, all additional calls succeed but are ignored except to increment the reference count.

Remarks

A client application or service provider must call MAPIInitIdle before calling any other idle engine function.

Every call to MAPIInitIdle must be matched by a subsequent call to MAPIDeInitIdle, or the idle engine is left running for the calling application.

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

Idle routine function

Usage

   ChangeIdleRoutine   

Changes the characteristics of a registered idle routine.

   DeregisterIdleRoutine   

Removes a registered idle routine from the MAPI system.

   EnableIdleRoutine   

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

   FtgRegisterIdleRoutine   

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

   MAPIDeInitIdle   

Shuts down the MAPI idle engine for the calling application.

   MAPIInitIdle   

Initializes the MAPI idle engine for the calling application.

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.