The following code illustrates how to seek a specified point in the stream source object or set the current stream time.
#include "os2.h" #include "os2me.h" #include "stdio.h" ULONG ulRC; /* Error return code */ HSTREAM hStream; /* Stream handle */ LONG lSeekPoint; /* Position to seek to */ . . . /*----------------------------------------------------------------- ---*/ /* Create a data stream, associate the data with the stream, and start*/ /* streaming. (See SpiCreateStream, SpiAssociate, and SpiStartStream. */ /*---------------------------------------------------------------------*/ . . . /*---------------------------------------------------------------------*/ /* Seek to a position within the data stream. */ /*---------------------------------------------------------------------*/ lSeekPoint = 900000; /* Seek to 5-minute position */ if (ulRC = SpiSeekStream(hStream, SPI_SEEK_ABSOLUTE, lSeekPoint)) return (ulRC); /* Error! */