IltmmWMProfile::GetStreamByNumber Example for C

For complete code, refer to the CNVWM demo.

void RemoveStreamByNumber(long lStreamNumber, IltmmWMProfile *pProfile) 
{
   IltmmWMStreamConfig *pStreamConfig = NULL; 
   char strQ[50]; 

   IltmmWMProfile__getStreamByNumber(pProfile, lStreamNumber, &pStreamConfig); 

   if(pStreamConfig) 
   {
      sprintf(strQ, "Remove stream number %d ?", lStreamNumber); 

      if (MessageBox(NULL, strQ, "Confirm", MB_YESNO) == IDYES) 
      {
         IltmmWMProfile_RemoveStream(pProfile, pStreamConfig); 
         // or, you can remove it by : 
         // IltmmWMProfile_RemoveStreamByNumber(pProfile, lStreamNumber); 
         IltmmWMStreamConfig_Release(pStreamConfig); 
      }
   }
}

For complete code, refer to the CNVWM demo.

L_MULTIMEDIATEX_API void IltmmWMProfile_GetStreamByNumber_Example (IltmmWMProfile *pProfile, long lStreamNumber)
{
   IltmmWMStreamConfig *pStreamConfig = NULL; 
   char strQ[50]; 

   IltmmWMProfile_GetStreamByNumber(pProfile, lStreamNumber, &pStreamConfig); 

   if(pStreamConfig) 
   {
      sprintf(strQ, "Remove stream number %d ?", lStreamNumber); 

      if (MessageBox(NULL, strQ, "Confirm", MB_YESNO) == IDYES) 
      {
         IltmmWMProfile_RemoveStream(pProfile, pStreamConfig); 
         // or, you can remove it by : 
         // IltmmWMProfile_RemoveStreamByNumber(pProfile, lStreamNumber); 
         IltmmWMStreamConfig_Release(pStreamConfig); 
      }
   }
}