The following code illustrates how to stop data streaming for a stream instance or a group of streams.
#include "os2.h" #include "os2me.h" ULONG ulRC; /* Error return code */ HSTREAM hStream; /* Stream handle */ . . . /*------------------------------------------------------------------- */ /* Create a data stream, associate the data with the stream and start */ /* streaming. (See SpiCreateStream, SpiAssociate, and SpiStartStream.)*/ /*--------------------------------------------------------------------*/ . . . /*--------------------------------------------------------------------------*/ /* Now stop the streaming. */ /*--------------------------------------------------------------------------*/ if (ulRC = SpiStopStream(hStream, SPI_STOP_STREAM)) return (ulRC); /* Error! */