home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional Developers Kit 1992 November / Disc01 / Disc01.mdf / runnable / mmos2 / mmtoolkt / h / ssm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-05-06  |  34.5 KB  |  661 lines

  1. /****************************************************************************/
  2. /*                                                                          */
  3. /* Module Name: SSM.H                                                       */
  4. /*                                                                          */
  5. /* OS/2 2.0 Multimedia Extensions Sync/Stream Manager Definitions file      */
  6. /*                                                                          */
  7. /* Copyright (c) International Business Machines Corporation 1991, 1992     */
  8. /*                        All Rights Reserved                               */
  9. /*                                                                          */
  10. /****************************************************************************/
  11.  
  12. #define MAX_SPI_NAME  9      /* Maximum ASCIIZ stream handler name/class  */
  13.                              /* and device driver name                    */
  14.  
  15.  
  16. /****************************************************************************/
  17. /*                                                                          */
  18. /*  Forward Declarations                                                    */
  19. /*                                                                          */
  20. /****************************************************************************/
  21. typedef struct _heh       FAR  *PHEH;              /* Ptr to an HEH         */
  22. typedef struct _dsc       FAR  *PDSC;              /* Ptr to a DSC          */
  23. typedef struct _ptrtab    FAR  *PPTRTAB;           /* Ptr to a PTRTAB       */
  24.  
  25.  
  26.  
  27. /* XLATOFF */
  28. #pragma pack(4)
  29. /* XLATON */
  30.  
  31. /****************************************************************************/
  32. /*                                                                          */
  33. /*  Global Type Declarations                                                */
  34. /*                                                                          */
  35. /****************************************************************************/
  36. typedef ULONG  HSTREAM;               /* Stream Handle                      */
  37. typedef HSTREAM FAR *PHSTREAM;        /* Pointer to Stream Handle           */
  38.  
  39. typedef ULONG  HEVENT;                /* Event Handle                       */
  40. typedef HEVENT FAR *PHEVENT;          /* Pointer to Event Handle            */
  41.  
  42. typedef ULONG  HID;                   /* Stream Handler ID                  */
  43. typedef HID  FAR *PHID;               /* Pointer to Stream Handler ID       */
  44.  
  45. typedef struct _lockh {               /* Memory locking handle (used by PDD)*/
  46.    BYTE     lock[16];
  47.    } LOCKH;
  48. typedef LOCKH           FAR  *PLOCKH;            /* Ptr to a LOCKH        */
  49.  
  50. #define RC ULONG                      /* Used for all return codes          */
  51.  
  52. typedef struct  _slave { /* slave */
  53.    HSTREAM       hstreamSlave;          /* Handle for this slave            */
  54.    MMTIME        mmtimeStart;           /* Offset in master stream time to start */
  55.    } SLAVE;                             /*  this slave.                     */
  56. typedef SLAVE           FAR  *PSLAVE;            /* Ptr to a SLAVE        */
  57.  
  58. /* XLATOFF */
  59. #pragma pack(1)
  60. /* XLATON */
  61.  
  62. typedef struct  _hand { /* hand */
  63.    SZ            szHandlerClass[MAX_SPI_NAME]; /* Stream handler class      */
  64.    SZ            szHandlerName[MAX_SPI_NAME];  /* Stream handler name       */
  65.    } HAND;
  66. typedef HAND            FAR  *PHAND;             /* Ptr to a HAND         */
  67.  
  68. /* XLATOFF */
  69. #pragma pack()
  70. /* XLATON */
  71.  
  72.  
  73. #include "spcb.h"
  74. #include "evcb.h"
  75. #include "acb.h"
  76. #include "dcb.h"
  77.  
  78. /****************************************************************************/
  79. /* INI file support defines                                                 */
  80. /****************************************************************************/
  81. /* RCDATA defines:                                                          */
  82. #define SPI_RESOURCE   1               /* RCDATA resource number            */
  83. #define SH_DLL_TYPE    0               /* DLL type stream handler           */
  84. #define SH_PDD_TYPE    1               /* PDD type stream handler           */
  85. #define SPCBSIZE       72L             /* SPCB length, the Resource compiler*/
  86.                                        /*   doesn't allow sizeof(SPCB).     */
  87.  
  88. /* XLATOFF */
  89. /****************************************************************************/
  90. /*                                                                          */
  91. /*  Function Prototypes for Application event entry routine, SHC entry      */
  92. /*  routine, SMH entry routine. All use the Pure C calling convention       */
  93. /*                                                                          */
  94. /****************************************************************************/
  95. typedef ULONG (APIENTRY EVFN) (PEVCB  pevcb);
  96. typedef EVFN (FAR *PEVFN);
  97.  
  98. typedef ULONG (APIENTRY SHCFN) (PVOID pParmIn);
  99. typedef SHCFN (FAR *PSHCFN);
  100.  
  101. typedef ULONG (APIENTRY SMHFN) (PVOID pParmIn);
  102. typedef SMHFN (FAR *PSMHFN);
  103.  
  104. /* XLATON */
  105. #ifdef XXXXX
  106. typedef PVOID PEVFN;
  107. typedef PVOID PSHCFN;
  108. typedef PVOID PSMHFN;
  109. #endif
  110.  
  111.  
  112. /****************************************************************************/
  113. /*                                                                          */
  114. /*  Function Prototypes for SPI functions                                   */
  115. /*  All use Pure C calling convention                                       */
  116. /*  Six major categories:                                                   */
  117. /*     - stream creation                                                    */
  118. /*     - stream control                                                     */
  119. /*     - event handling                                                     */
  120. /*     - sync handling                                                      */
  121. /*     - configuration                                                      */
  122. /*     - stream protocol programming                                        */
  123. /****************************************************************************/
  124.  
  125.  
  126. /* XLATOFF */
  127. /****************************************************************************/
  128. /* Stream Creation                                                          */
  129. /****************************************************************************/
  130.  
  131. ULONG APIENTRY SpiAssociate ( HSTREAM hstream,
  132.                               HID hid,
  133.                               PACB pacb );
  134.  
  135.  
  136. ULONG APIENTRY SpiEnumerateHandlers ( PHAND pahand,       /* ptr to array handler name/class */
  137.                                       PULONG pulNumHand );
  138.  
  139.  
  140. ULONG APIENTRY SpiGetHandler ( PSZ pszHName,
  141.                                PHID phidSrc,
  142.                                PHID phidTgt );
  143.  
  144. ULONG APIENTRY SpiCreateStream ( HID hidSrc,        /* input                   */
  145.                                  HID hidTgt,        /* input                   */
  146.                                  PSPCBKEY pspcbkey, /* input                   */
  147.                                  PDCB pdcbSrc,      /* input - Src device info */
  148.                                  PDCB pdcbTgt,      /* input - Tgt device info */
  149.                                  PIMPL_EVCB pevcb,  /* input                   */
  150.                                  PEVFN EventEntry,  /* input                   */
  151.                                  HSTREAM hstreamBuf,/* input                   */
  152.                                  PHSTREAM phstream, /* output                  */
  153.                                  PHEVENT phevent ); /* output - implicit hevent*/
  154.  
  155.  
  156. /****************************************************************************/
  157. /* Stream Control                                                           */
  158. /****************************************************************************/
  159.  
  160.  
  161. ULONG APIENTRY SpiDestroyStream ( HSTREAM hstream );
  162.  
  163.  
  164. ULONG APIENTRY SpiGetTime ( HSTREAM hstream,
  165.                             PMMTIME pmmtime );
  166.  
  167. ULONG APIENTRY SpiSeekStream ( HSTREAM hstream,
  168.                                ULONG ulFlags,
  169.                                LONG  lSeekPoint );  /*mmtime or other          */
  170.  
  171. /* SpiSeekStream() ulFlags defines:                                         */
  172. #define SPI_SEEK_ABSOLUTE   0x0000L         /* Seek from beginning of stream*/
  173. #define SPI_SEEK_RELATIVE   0x0001L         /* Seek from current location   */
  174. #define SPI_SEEK_FROMEND    0x0002L         /* TEMP                         */
  175. #define SPI_SEEK_SLAVES     0x0010L         /* Seek all slave streams       */
  176.  
  177. #define SPI_SEEK_MMTIME     0x0000L         /* lSeekPoint == mmtime (default)*/
  178. #define SPI_SEEK_BYTES      0x0100L         /* lSeekPoint == bytes          */
  179.  
  180. #define VALIDSEEKFLAGS      ( SPI_SEEK_RELATIVE |           \
  181.                               SPI_SEEK_ABSOLUTE |           \
  182.                               SPI_SEEK_FROMEND  |           \
  183.                               SPI_SEEK_MMTIME |             \
  184.                               SPI_SEEK_SLAVES |             \
  185.                               SPI_SEEK_BYTES )
  186.  
  187.  
  188. ULONG APIENTRY SpiStartStream ( HSTREAM hstream,
  189.                                 ULONG ulFlags );
  190.  
  191. /* SpiStartStream() ulFlags defines:                                        */
  192. #define SPI_START_STREAM    0x0000L         /* Only start this one stream   */
  193. #define SPI_START_SLAVES    0x0001L         /* Start this master and any slaves */
  194. #define SPI_START_PREROLL   0x0002L         /* Start the stream, but do preroll */
  195.  
  196. #define VALIDSTARTFLAGS     ( SPI_START_STREAM |            \
  197.                               SPI_START_SLAVES |            \
  198.                               SPI_START_PREROLL )
  199.  
  200.  
  201. ULONG APIENTRY SpiStopStream ( HSTREAM hstream,
  202.                                ULONG ulFlags );
  203.  
  204. /* XLATON */
  205. /* SpiStopStream() ulFlags defines:                                         */
  206. #define SPI_STOP_STREAM    0x0000L         /* Only stop this one stream     */
  207.                                            /* The default is to pause the data          */
  208.                                            /*  stream. No change to data buffers.       */
  209.                                            /*  synchronous call (no event notification) */
  210. #define SPI_STOP_SLAVES    0x0001L         /* Stop this master and any slaves           */
  211. #define SPI_STOP_FLUSH     0x0002L         /* Stop and flush all filled buffers.        */
  212.                                            /*  Stops the Src & Tgt SH, lets the         */
  213.                                            /*  Tgt SH run until out of buffers          */
  214.                                            /*  thereby, "flushing" all buffers.         */
  215.                                            /*  Tgt SH stops when out of buffers         */
  216.                                            /*  (This is a ASYNCHRONOUS call, event      */
  217.                                            /*   notification sent to appl when done.)   */
  218. #define SPI_STOP_DISCARD   0x0004L         /* Stop and discard all filled buffers.      */
  219.                                            /*  Stops the Src & Tgt SH                   */
  220.                                            /*  then discards all buffers current for    */
  221.                                            /*  this stream.                             */
  222.                                            /*  (This is a ASYNCHRONOUS call, event      */
  223.                                            /*   notification sent to appl when done.)   */
  224.  
  225.  
  226. /* XLATOFF */
  227. #define VALIDSTOPFLAGS     ( SPI_STOP_STREAM |              \
  228.                              SPI_STOP_SLAVES |              \
  229.                              SPI_STOP_FLUSH |               \
  230.                              SPI_STOP_DISCARD )
  231.  
  232.  
  233. /****************************************************************************/
  234. /* Event Handling                                                           */
  235. /****************************************************************************/
  236.  
  237.  
  238. ULONG APIENTRY SpiDisableEvent ( HEVENT hevent );
  239.  
  240.  
  241. ULONG APIENTRY SpiEnableEvent ( PEVCB pevcb,
  242.                                 PHEVENT phevent );
  243.  
  244.  
  245. /****************************************************************************/
  246. /* Sync Handling                                                            */
  247. /****************************************************************************/
  248.  
  249.  
  250. ULONG APIENTRY SpiDisableSync  ( HSTREAM hstreamMaster );
  251.  
  252.  
  253. ULONG APIENTRY SpiEnableSync ( HSTREAM hstreamMaster,
  254.                                PSLAVE paslaveList,
  255.                                ULONG ulNumSlaves,
  256.                                MMTIME mmtimeSync );
  257.  
  258.  
  259. /****************************************************************************/
  260. /* Protocol manipulation                                                    */
  261. /****************************************************************************/
  262.  
  263. ULONG APIENTRY SpiGetProtocol ( HID hid,
  264.                                 PSPCBKEY pspcbkey,  /* input key               */
  265.                                 PSPCB pspcb );      /* output SPCB             */
  266.  
  267.  
  268. ULONG APIENTRY SpiInstallProtocol ( HID hid,
  269.                                     PSPCBKEY pspcbkey,  /* input key           */
  270.                                     PSPCB pspcb ,       /* input SPCB          */
  271.                                     ULONG ulFlags );    /* install flags       */
  272.  
  273. /* SpiInstallProtocol() ulFlags defines:                                    */
  274. #define SPI_INSTALL_PROTOCOL   0x0000L         /* Install this protocol     */
  275. #define SPI_DEINSTALL_PROTOCOL 0x0001L         /* DeInstall this protocol   */
  276.  
  277. #define VALIDINSTALLFLAGS     (SPI_INSTALL_PROTOCOL | SPI_DEINSTALL_PROTOCOL)
  278.  
  279. ULONG APIENTRY SpiEnumerateProtocols ( HID hid,
  280.                                        PVOID    paSPCBKeys,        /* ptr to buffer to fill with SPCB keys */
  281.                                        PULONG   pulNumSPCBKeys );  /* # of entries buffer on input,        */
  282.                                                                /*  # of SPCB key on output.            */
  283. /* XLATON */
  284.  
  285.  
  286.  
  287. /****************************************************************************/
  288. /*                                                                          */
  289. /*  Function Prototypes for SMH functions                                   */
  290. /*  All use Pure C calling convention                                       */
  291. /* NOTE ABOUT POINTERS:                                                     */
  292. /*  0:32 linear addresses for ring 3 (DLL) stream handlers                  */
  293. /*  16:16 selector/offset addresses for ring 0 (PDD) stream handlers        */
  294. /****************************************************************************/
  295.  
  296. ULONG APIENTRY SMHEntryPoint ( PVOID pParmIn );
  297.  
  298. typedef struct _smh_common { /* smhfunc */
  299.       ULONG    ulFunction;        /* SMH command function                   */
  300.       HID      hid;               /* handler ID                             */
  301.    } SMH_COMMON;
  302. typedef SMH_COMMON      FAR  *PSMH_COMMON;       /* Ptr to common part    */
  303.  
  304.  
  305. /****************************************************************************/
  306. #define SMH_REGISTER           0L              /* (Valid only from ring 3 stream */
  307.                                                /*  handler)                 */
  308.      typedef struct  _parm_reg { /* smhreg */
  309.         ULONG     ulFunction;                  /* SMH command function      */
  310.         PSZ       pszSHName;                   /* Max size = 8 characters   */
  311.         PHID      phidSrc;                     /* (9 including null)        */
  312.         PHID      phidTgt;
  313.         PSHCFN    pshcfnEntry;                 /* Handler entry point for SHC's  */
  314.                                                /*  Only used for Ring 0 handlers.*/
  315.         ULONG     ulFlags;
  316.         ULONG     ulMaxNumStreams;             /* Max # of streams          */
  317.         ULONG     ulMaxNumEvents;              /* Max # of events/stream    */
  318.         } PARM_REG;
  319. typedef PARM_REG        FAR  *PPARM_REG;
  320.  
  321. #define REGISTER_TGT_HNDLR     0x0001L         /* This handler is Target.   */
  322. #define REGISTER_SRC_HNDLR     0x0002L         /* This handler is Source.   */
  323.                                                /* Handlr can be both.       */
  324. #define REGISTER_NONSTREAMING  0x0004L         /* Handler is non-streaming. */
  325. #define VALIDREGISTERFLAGS     (REGISTER_TGT_HNDLR | REGISTER_SRC_HNDLR | REGISTER_NONSTREAMING)
  326.  
  327.  
  328. /* Notes:                                                                     */
  329. /*  - Since ring 0 (DD) stream handlers can not use the IDC interface to the  */
  330. /*    sync/stream manager during DD initialization time, it must use the IOCTL*/
  331. /*    function to perform the SMH_REGISTER function. The addresses are 16:16  */
  332. /*    for this IOCTl instead of 0:32, because it comes form a device driver.  */
  333. #define SSMDD_CATEGORY            0x0081    /* Category (For ring 0 stream handler) */
  334. #define IOCTL_FUNC_SMH_REGISTER   0x0040    /* Function (For ring 0 stream handler) */
  335.  
  336.  
  337. /****************************************************************************/
  338. #define SMH_DEREGISTER         1L              /* SMH_Deregister()          */
  339.      typedef struct  _parm_dereg { /* smhder */
  340.         ULONG     ulFunction;                  /* SMH command function      */
  341.         PSZ       pszSHName;                   /* Max size = 8 char, 9 includes */
  342.         } PARM_DEREG;                          /* the null.                 */
  343. typedef PARM_DEREG      FAR  *PPARM_DEREG;
  344.  
  345.  
  346. /****************************************************************************/
  347. #define SMH_REPORTEVENT        2L              /* SMH_ReportEvent()         */
  348.      typedef struct  _parm_event { /* smhrev */
  349.         ULONG     ulFunction;                  /* SMH command function      */
  350.         HID       hid;
  351.         HEVENT    hevent;                      /* Used only for explicit events   */
  352.                                                /*  Must be 0 for sync and implicit*/
  353.                                                /*  events (i.e. error events)     */
  354.         PEVCB     pevcbEvent;                  /* Event status & HSTREAM          */
  355.         } PARM_EVENT;
  356. typedef PARM_EVENT      FAR  *PPARM_EVENT;
  357.  
  358.  
  359. /****************************************************************************/
  360. #define SMH_NOTIFY             3L              /* SMH_Notify()              */
  361.      typedef struct  _parm_notify { /* smhnot */
  362.         ULONG     ulFunction;       /* Input - SMH command function         */
  363.         HID       hid;              /* Input                                */
  364.         HSTREAM   hstream;          /* Input                                */
  365.         ULONG     ulFlags;          /* Input/Output                         */
  366.         ULONG     ulGetNumEntries;  /* Input/Output - # of entries in table */
  367.         ULONG     ulRetNumEntries;  /* Input/Output - # of entries in table */
  368.         PVOID     pGetBufTab;       /* Output - Ptr to buffer/record table  */
  369.         PVOID     pRetBufTab;       /* Input - Ptr to buffer/record table   */
  370.         } PARM_NOTIFY;
  371. typedef PARM_NOTIFY     FAR  *PPARM_NOTIFY;
  372.  
  373.      typedef struct _srcbuftab { /* srcbuftab */
  374.         PVOID    pBuffer;      /* Ptr to buffer                             */
  375.         PVOID    pRecord;      /* Ptr to record in buffer (split-streams only)  */
  376.         ULONG    ulLength;     /* Max buf length on GetEmpty, Filled        */
  377.                                /* (actual) rec/buf length on ReturnFull.    */
  378.         ULONG    ulMessageParm; /* Message to passed to application         */
  379.         MMTIME   mmtimeOffset; /* mmtime offset from beginning of buffer    */
  380.         } SRCBUFTAB;
  381. typedef SRCBUFTAB       FAR  *PSRCBUFTAB;        /* Ptr to a buffer entry */
  382.  
  383.      typedef struct _tgtbuftab { /* tgtbuftab */
  384.         PVOID    pBuffer;      /* Ptr to buffer                             */
  385.         ULONG    ulBufId;      /* Buffer ID. Passed to SH on GetFull, must  */
  386.                                /* be passed back to SSM on ReturnEmpty.     */
  387.         ULONG    ulLength;     /* Filled (actual) buffer length on GetFull, */
  388.                                /* unused on ReturnEmpty.                    */
  389.         ULONG    ulMessageParm; /* Message to passed to application         */
  390.         MMTIME   mmtimeOffset; /* mmtime offset from beginning of buffer    */
  391.         } TGTBUFTAB;
  392. typedef TGTBUFTAB       FAR  *PTGTBUFTAB;        /* Ptr to a buffer entry */
  393.  
  394. /*SMH_ulFlags:                                                              */
  395. #define BUF_GETEMPTY       0x00000001L   /* Ptr returned in SMH_pGetBuffer  */
  396. #define BUF_RETURNFULL     0x00000002L   /* Ptr passed in SMH_pRetBuffer    */
  397. #define BUF_GETFULL        0x00000004L   /* Ptr returned in SMH_pGetBuffer  */
  398. #define BUF_RETURNEMPTY    0x00000008L   /* Ptr passed in SMH_pRetBuffer    */
  399. #define BUF_GIVEBUF        0x00000010L   /* Ptr passed in SMH_pRetBuffer    */
  400. #define BUF_EOS            0x00000100L   /* End of stream. Source sets this on */
  401.                                          /*  last buffer. Target sets it after */
  402.                                          /*  consuming the laset buffer.       */
  403. #define BUF_RECORDS        0x00004000L   /* One or more records (Split-stream) */
  404. #define BUF_LASTRECORD     0x00008000L   /* (BUF_RETURNFULL only) Mark         */
  405.                                          /* these record(s) as being the       */
  406.                                          /* last in the buffer. So the SSM     */
  407.                                          /* knows the maximum # of records     */
  408.                                          /* produced for this buffer.          */
  409.                                          /* (Split stream only)                */
  410. /*SMH_ulFlags: (Available at ring 0 only)                                      */
  411. #define BUF_LINEAR         0x00010000L   /* Ptrs are Global linear (Ring 0 only) */
  412. #define BUF_PHYSICAL       0x00020000L   /* Ptrs are physical (Ring 0 only)      */
  413.                                          /* (valid only for phyically            */
  414.                                          /*  contiguous buffers)                 */
  415. #define BUF_RESERVED       0x00040000L   /* Reserved                             */
  416.  
  417. #define VALIDSOURCEFLAGS (BUF_RETURNFULL|BUF_GETEMPTY|BUF_EOS|BUF_LASTRECORD|BUF_PHYSICAL|BUF_LINEAR|BUF_RECORDS|BUF_GIVEBUF)
  418. #define VALIDTARGETFLAGS (BUF_RETURNEMPTY|BUF_GETFULL|BUF_PHYSICAL|BUF_LINEAR|BUF_EOS)
  419.  
  420.  
  421. /****************************************************************************/
  422. #define SMH_LOCKMEM            4L              /* SMH_LockMem()             */
  423.      typedef struct  _parm_lockm { /* smhloc */
  424.         ULONG     ulFunction;                  /* SMH command function      */
  425.         PVOID     pBuffer;
  426.         ULONG     ulBufSize;
  427.         PLOCKH    plockh;
  428.         ULONG     ulFlags;
  429.         } PARM_LOCKM;
  430. typedef PARM_LOCKM      FAR  *PPARM_LOCKM;
  431.  
  432. /*SMH_ulFlags:                                                              */
  433. #define SSM_LOCKMEM            0x0000L         /* Lock Memory.              */
  434. #define SSM_UNLOCKMEM          0x0001L         /* Unlock memory.            */
  435. #define SSM_CONTIGLOCK         0x0002L         /* Lock memory contiguously. */
  436. /****************************************************************************/
  437.  
  438.  
  439.  
  440. /****************************************************************************/
  441. /*                                                                          */
  442. /*  Function Prototypes for SHC functions (Stream Handler Functions)        */
  443. /*  All use Pure C calling convention                                       */
  444. /*                                                                          */
  445. /* NOTE ABOUT POINTERS:                                                     */
  446. /*  0:32 linear addresses for ring 3 (DLL) stream handlers                  */
  447. /*  16:16 selector/offset addresses for ring 0 (PDD) stream handlers        */
  448. /****************************************************************************/
  449. typedef struct _shc_common { /* shcfunc */
  450.       ULONG    ulFunction;        /* Handler command function               */
  451.       HID      hid;               /* handler ID                             */
  452.    } SHC_COMMON;
  453. typedef SHC_COMMON      FAR  *PSHC_COMMON;       /* Ptr to common part    */
  454.  
  455.  
  456. /****************************************************************************/
  457. #define SHC_ASSOCIATE             0L
  458.      typedef struct _parm_assoc { /* shcass */
  459.         ULONG    ulFunction;        /* Handler command function             */
  460.         HID      hid;               /* handler ID                           */
  461.         HSTREAM  hstream;           /* handle of stream instance            */
  462.         PACB     pacb;              /* pointer to associate control block   */
  463.      } PARM_ASSOC;
  464. typedef PARM_ASSOC      FAR  *PPARM_ASSOC;
  465.  
  466.  
  467. /****************************************************************************/
  468. #define SHC_CLOSE                 1L
  469.      typedef struct _parm_close { /* shcclo */
  470.         ULONG    ulFunction;        /* Handler command function             */
  471.         HID      hid;               /* handler ID                           */
  472.      } PARM_CLOSE;
  473. typedef PARM_CLOSE      FAR  *PPARM_CLOSE;
  474.  
  475.  
  476. /****************************************************************************/
  477. #define SHC_CREATE                2L
  478.      typedef struct _parm_create { /* shccrt */
  479.         ULONG    ulFunction;        /* Handler command function             */
  480.         HID      hid;               /* handler ID                           */
  481.         HSTREAM  hstream;           /* handle of stream instance            */
  482.         SPCBKEY  spcbkey;           /* type of stream to create             */
  483.         PSPCB    pspcb;             /* Pointer to SPCB from handler         */
  484.         HSTREAM  hstreamBuf;        /* Used for split streams or to associate*/
  485.                                     /* another stream with this stream.     */
  486.         PDCB     pdcb;              /* pointer to device control block      */
  487.      } PARM_CREATE;
  488. typedef PARM_CREATE     FAR  *PPARM_CREATE;
  489.  
  490.  
  491. /****************************************************************************/
  492. #define SHC_DESTROY               3L
  493.      typedef struct _parm_destroy { /* shcdes */
  494.         ULONG    ulFunction;        /* Handler command function             */
  495.         HID      hid;               /* handler ID                           */
  496.         HSTREAM  hstream;           /* handle of stream instance            */
  497.      } PARM_DESTROY;
  498. typedef PARM_DESTROY    FAR  *PPARM_DESTROY;
  499.  
  500.  
  501. /****************************************************************************/
  502. #define SHC_START                 4L
  503.      typedef struct _parm_start { /* shcstr */
  504.         ULONG    ulFunction;        /* Handler command function             */
  505.         HID      hid;               /* handler ID                           */
  506.         HSTREAM  hstream;           /* handle of stream instance            */
  507.         ULONG    ulFlags;           /* Start flags                          */
  508.      } PARM_START;
  509. typedef PARM_START      FAR  *PPARM_START;
  510.  
  511. /* ulFlags:                                                                 */
  512. #define FLUSH_START      0x0001L    /* This start is a result of a Flush Stop command. */
  513.  
  514.  
  515. /****************************************************************************/
  516. #define SHC_STOP                  5L
  517.      typedef struct _parm_stop { /* shcstp */
  518.         ULONG    ulFunction;        /* Handler command function             */
  519.         HID      hid;               /* handler ID                           */
  520.         HSTREAM  hstream;           /* handle of stream instance            */
  521.         ULONG    ulFlags;           /* Stop flags (refer to ulFlags defines under */
  522.                                     /*  SpiStopStream() call.               */
  523.      } PARM_STOP;
  524. typedef PARM_STOP       FAR  *PPARM_STOP;
  525.  
  526.  
  527. /****************************************************************************/
  528. #define SHC_SEEK                  6L
  529.      typedef struct _parm_seek { /* shcsek */
  530.         ULONG    ulFunction;        /* Handler command function             */
  531.         HID      hid;               /* handler ID                           */
  532.         HSTREAM  hstream;           /* handle of stream instance            */
  533.         ULONG    ulFlags;           /* Seek flag (refer to ulFlags defines  */
  534.                                     /*  under SpiSeekStream() call).        */
  535.         LONG     lSeekPoint;        /* seek to point , mmtime or other      */
  536.      } PARM_SEEK;
  537. typedef PARM_SEEK       FAR  *PPARM_SEEK;
  538.  
  539.  
  540. /****************************************************************************/
  541. #define SHC_ENABLE_EVENT          7L
  542.      typedef struct _parm_enevent { /* shceev */
  543.         ULONG    ulFunction;        /* Handler command function             */
  544.         HID      hid;               /* handler ID                           */
  545.         HEVENT   hevent;            /* handle of event to enable            */
  546.         PEVCB    pevcbUser;         /* User event information (e.g. hstream */
  547.                                     /*  EventType, EventSubType)            */
  548.      } PARM_ENEVENT;
  549. typedef PARM_ENEVENT    FAR  *PPARM_ENEVENT;
  550.  
  551.  
  552. /****************************************************************************/
  553. #define SHC_DISABLE_EVENT         8L
  554.      typedef struct _parm_disevent { /* shcdev */
  555.         ULONG    ulFunction;        /* Handler command function             */
  556.         HID      hid;               /* handler ID                           */
  557.         HSTREAM  hstream;           /* handle to stream for this event      */
  558.         HEVENT   hevent;            /* handle of event to disable           */
  559.      } PARM_DISEVENT;
  560. typedef PARM_DISEVENT   FAR  *PPARM_DISEVENT;
  561.  
  562.  
  563. /****************************************************************************/
  564. #define SHC_ENABLE_SYNC           9L
  565.      typedef struct _parm_ensync { /* shcesy */
  566.         ULONG    ulFunction;        /* Handler command function             */
  567.         HID      hid;               /* handler ID                           */
  568.         HSTREAM  hstream;           /* handle of stream instance            */
  569.         ULONG    ulFlags;           /* Sync flags                           */
  570.         MMTIME   mmtimeSync;        /* granularity of sync interval (if null, use default) */
  571.         PSYNC_EVCB pevcbSyncPulse;  /* Sync pulse EVCB information          */
  572.         ULONG    ulSyncPulseSem;    /* Optional 16 bit system               */
  573.                                     /* Semaphore for handler                */
  574.      } PARM_ENSYNC;
  575. typedef PARM_ENSYNC     FAR  *PPARM_ENSYNC;
  576.  
  577. /* ulFlags:                                                                 */
  578. #define SYNC_MASTER      0x0000L    /* The handler will be a master for this sync*/
  579. #define SYNC_SLAVE       0x0001L    /* The handler will be a slave for this sync */
  580.  
  581.  
  582. /****************************************************************************/
  583. #define SHC_DISABLE_SYNC          10L
  584.      typedef struct _parm_dissync { /* shcdsy */
  585.         ULONG    ulFunction;        /* Handler command function             */
  586.         HID      hid;               /* handler ID                           */
  587.         HSTREAM  hstream;           /* handle of stream instance            */
  588.      } PARM_DISSYNC;
  589. typedef PARM_DISSYNC    FAR  *PPARM_DISSYNC;
  590.  
  591.  
  592. /****************************************************************************/
  593. #define SHC_GET_TIME              11L
  594.      typedef struct _parm_gtime { /* shcgti */
  595.         ULONG    ulFunction;        /* Handler command function             */
  596.         HID      hid;               /* handler ID                           */
  597.         HSTREAM  hstream;           /* handle of stream instance            */
  598.         MMTIME   mmtimeCurrent;     /* Returns current stream time          */
  599.      } PARM_GTIME;
  600. typedef PARM_GTIME      FAR  *PPARM_GTIME;
  601.  
  602.  
  603. /****************************************************************************/
  604. #define SHC_GET_PROTOCOL          12L
  605.      typedef struct _parm_gprot { /* shcgpt */
  606.         ULONG    ulFunction;        /* Handler command function             */
  607.         HID      hid;               /* handler ID                           */
  608.         SPCBKEY  spcbkey;           /* key of SPCB                          */
  609.         PSPCB    pspcb;             /* ptr to SPCB (output)                 */
  610.      } PARM_GPROT;
  611. typedef PARM_GPROT      FAR  *PPARM_GPROT;
  612.  
  613.  
  614. /****************************************************************************/
  615. #define SHC_INSTALL_PROTOCOL      13L
  616.      typedef struct _parm_instprot { /* shcipt */
  617.         ULONG    ulFunction;        /* Handler command function             */
  618.         HID      hid;               /* handler ID                           */
  619.         SPCBKEY  spcbkey;           /* key of SPCB                          */
  620.         PSPCB    pspcb;             /* ptr to SPCB to install               */
  621.         ULONG    ulFlags;           /* Install / Deinstall flags            */
  622.      } PARM_INSTPROT;
  623. typedef PARM_INSTPROT   FAR  *PPARM_INSTPROT;
  624.  
  625.  
  626. /****************************************************************************/
  627. #define SHC_ENUMERATE_PROTOCOLS   14L
  628.      typedef struct _parm_enumprot { /* shcqpi */
  629.         ULONG    ulFunction;        /* Handler command function             */
  630.         HID      hid;               /* handler ID                           */
  631.         PVOID    paSPCBKeys;        /* ptr to buffer to fill with SPCB keys */
  632.         PULONG   pulNumSPCBKeys;    /* # of entries buffer on input,        */
  633.                                     /*  # of SPCB key on output.            */
  634.      } PARM_ENUMPROT;
  635. typedef PARM_ENUMPROT   FAR  *PPARM_ENUMPROT;
  636.  
  637.  
  638. /****************************************************************************/
  639. #define SHC_NEGOTIATE_RESULT      15L
  640.      typedef struct _parm_negotiate { /* shcneg */
  641.         ULONG    ulFunction;        /* Handler command function             */
  642.         HID      hid;               /* handler ID                           */
  643.         HSTREAM  hstream;           /* handle of stream instance            */
  644.         PSPCB    pspcb;             /* Ptr to negotiated SPCB               */
  645.         ULONG    ulErrorStatus;     /* On error, indicates which field in the*/
  646.      } PARM_NEGOTIATE;              /* SPCB failed the negotiation.         */
  647. typedef PARM_NEGOTIATE  FAR  *PPARM_NEGOTIATE;
  648.  
  649.  
  650. /****************************************************************************/
  651.  
  652. /*  Reserved - SHC command       16L                                        */
  653.  
  654. /****************************************************************************/
  655.  
  656.  
  657.  
  658. /* XLATOFF */
  659. #pragma pack()
  660. /* XLATON */
  661.