The following code illustrates how to disable event notification for a particular event.
#include "os2.h" #include "os2me.h" ULONG ulRC; /* Error return code */ HEVENT hevent; /* Event handle */ . . . /*----------------------------------------------------------------- */ /* Create a data stream with an event routine, and enable an event*/ /* to get the event handle (hevent). (See SpiCreateStream and */ /* SpiEnableEvent.) */ /*------------------------------------------------------------------*/ . . /*------------------------------------------------------------------*/ /* Do other processing. */ /*---------------------------------------------------------------- -*/ . . /*--------------------------------------------------------------- -*/ /* Now disable the event. */ /*--------------------------------------------------------------- -*/ if (ulRC = SpiDisableEvent (heventTime)) return (ulRC); /* error! */