locked
How to select different Media Collection (My Device/Storage Card) by c++ program ? RRS feed

  • Question

  •  

    Hi,

     

    I'd like to develop a play list editor on window mobile.

    User should be able to select the song on storage card or "My Device".

    But I only can get one media collection by IWMPCore->get_mediaCollection(). 

    How to select another media collection by C++ program? Thanks for your information.

     

    The part of my program ...

     

    ......

    // Initialise COM 
    hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);


    // create an instance and get IUnknown pointer
    hr = CoCreateInstance(CLSID_WindowsMediaPlayer, NULL, CLSCTX_ALL, IID_IWMPPlayer, (VOID FAR **) &pWMPPlayer);

     

    pWMPPlayer->get_mediaCollection(&pMediaCollection); // get current selected media collection
    pMediaCollection->getAll(&pMediaItems); // get all songs on media collection
    pMediaItems->get_count(&count);

    .......

     

    Best Regards,

    Tony

     

    Friday, October 19, 2007 3:20 AM