The following code illustrates how to return a list of stream protocol keys for the specified stream handler.
#include "os2.h"
#include "os2me.h"
ULONG ulRC; /* Error return code */
HID hidTarget; /* Target handler ID */
ULONG ulNumSPCBKeys = 20; /* Number of entries */
SPCBKEY aspcbkey[20]; /* Array of SPCB keys*/
.
.
.
/*----------------------------------------------------------*/
/* Get the stream handler ID (hidSource) for the file */
/* stream handler using SpiGetHandler. */
/*----------------------------------------------------------*/
.
.
.
/*----------------------------------------------------------*/
/* Get a list of protocols for the digital audio stream
/* handler. */
/*----------------------------------------------------------*/
if (ulRC = SpiEnumerateProtocols( hidTarget, &aspcbkey, &ulNumSPCBKeys))
return(ulRC); /* error! */