JavaScript Editor js editor     Web development 

Main Page

Removes the specified routine from the idle loop.

void _DeActivateIdle(unsigned int IdleIdentifier)
unsigned int IdleIdentifier;         /* Routine to be removed
 from idle list. */


You must remove each idle routine from the idle routine list when its library is unloaded.

For more information on how to create an API library and integrate it with Visual FoxPro, see Accessing the Visual FoxPro API.


The following example activates an idle event handler when the library is loaded. The idle event handler simply prints a message and is deactivated when the library is unloaded. As in the following example, _DeActivateIdle(В ) is usually called from a CALLONUNLOAD function.

Visual FoxPro Code

В Copy Code

C Code

В Copy Code
#include <pro_ext.h>

static unsigned IdlerID;

//   This is the routine that is registered as an idle event handler.
void FAR IdleHandler(WHandle wh, EventRec *ev)
   _PutStr("\nIdleHandler() called.");

void FAR Activate(ParamBlk FAR *parm)
   IdlerID = _ActivateIdle((FPFI) IdleHandler);

//   When the library is unloaded we must deactivate the idle event 
//   handler in a CALLONUNLOAD function.
void FAR DeActivate(ParamBlk FAR *parm)

FoxInfo myFoxInfo[] = {
   {"ACTIVATE",  (FPFI) Activate, CALLONLOAD,   ""},
FoxTable _FoxTable = {
   (FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo

See Also

JavaScript Editor js editor     Web development