The following code illustrates how to query the current stream time.
#include "os2.h" #include "os2me.h" ULONG ulRC; /* Error return code */ HSTREAM hStream; /* Stream handle */ MMTIME mmtime; /* Stream time */ . . . /*--------------------------------------------------------------------*/ /* Create a data stream, associate the data with the stream, and start*/ /* streaming. (See SpiCreateStream, SpiAssociate, and SpiStartStream.)*/ /*--------------------------------------------------------------------*/ . . . /*--------------------------------------------------------------------------*/ /* Get stream time. */ /*--------------------------------------------------------------------------*/ if (ulRC = SpiGetTime (hStream, &mmtime )) return (ulRC); /* error! */