IltmmPlay::get_MidiRenderers Example for C

// This function deselects all MIDI renderers from
// the specified play object. 
void DisplayMidiRenderers(IltmmPlay *pPlay) 
{
   IltmmRenderers *pRenderers = NULL; 
   IltmmRenderer *pRenderer = NULL; 
   long lCount; 
   int i; 

   HRESULT hr = IltmmPlay__get_MidiRenderers(pPlay, &pRenderers); 
   if(FAILED(hr) || pRenderers == NULL) 
      return; 

   IltmmRenderers__get_Count(pRenderers, &lCount); 

   for(i=0; i<lCount; i++)
   {
      IltmmRenderers_Item(pRenderers, i, &pRenderer); 
      IltmmRenderer__put_Selected(pRenderer, VARIANT_FALSE); 
      IltmmRenderer_Release(pRenderer); 
   }

   IltmmRenderers_Release(pRenderers); 
}

This function deselects all MIDI renderers from the specified play object.

L_MULTIMEDIATEX_API void IltmmPlay_get_MidiRenderers_Example (IltmmPlay* pPlay)
{
	IltmmRenderers *pRenderers = NULL; 
	IltmmRenderer *pRenderer = NULL; 
	long lCount; 
	int i; 

	HRESULT hr = IltmmPlay_get_MidiRenderers(pPlay, &pRenderers); 

	if(FAILED(hr) || pRenderers == NULL) 
		return; 

	IltmmRenderers_get_Count(pRenderers, &lCount); 

	for(i=0; i<lCount; i++)
	{
		IltmmRenderers_Item(pRenderers, i, &pRenderer); 
		IltmmRenderer_put_Selected(pRenderer, VARIANT_FALSE); 
		IltmmRenderer_Release(pRenderer); 
	}

	IltmmRenderers_Release(pRenderers); 
}