The following code illustrates how to report an interrupt from a device.
#include "os2.h" #include "os2me.h" #include "shdd.h" ULONG ulRC; /* Error return code */ HSTREAM hstream; /* Stream handle */ SHD_REPORTINT shdpb; /* Parameter block */ PSHDFN pshdfn; /* Pointer to SHD entry point */ PVOID pBuffer; /* Pointer to buffer */ ULONG ulStreamTime; /* Stream time in millisecs */ . . . /*----------------------------------------------------------------------*/ /* Report a read has completed. */ /*----------------------------------------------------------------------*/ shdpb.ulFunction = SHD_REPORT_INT; shdpb.hstream = hstream; shdpb.pBuffer = pBuffer; shdpb.ulFlag = SHD_READ_COMPLETE; shdpb.ulStatus = LengthRecordedBuffer; shdpb.ulStreamTime = ulStreamTime; if (ulRC = pshdfn (&shdpb)) return (ulRC); /* error! */