windows media library on smartphone emulator RRS feed

  • Question

  • Hi.

    I am currently developing a media player for smartphone, in C#, using Visual Studio 2005, Windows Media Player 10 SDK, and Windows Mobile 5 Smartphone SDK.

    For trying my application I use Smartphone emulator for Windows Mobile 5.

    I have the following problem.

    I emulate a storage card using folder sharing. But when I use "update library" in Windows Media Player 10, it doesn't collect the music files in the shared folder. During the update process, it repports "n files found", but none is added to the library, and the library remains empty. Otherwise if the files weren't in the Shared Folder (or any subfolder of it, like My Documents, My Music, etc.) files are added correctly. In this way the windows media player library can't contain songs from the shared folder. Otherwise, if I use "File Open" from the library menu, it can play a song from Shared Folder. How to make the Windows Media Player 10 library on the Emulator contain songs from the Shared Folder?

    I tried to add the songs to the library from my program, using something like:

    private WMPLib.WindowsMediaPlayer Player;


    Player.mediaCollection.add("\\Storage Card\\Martial.mp3");

    And I get this:

    System.Runtime.InteropServices.COMException was unhandled
        at WMPLib.IWMPMediaCollection.add()
        at DeviceApplication1.Form1.ReadFileWithSongsDescription()
        at DeviceApplication1.Form1..ctor()
        at DeviceApplication1.Program.Main()

    So, I can't add songs to the library this way.

    How to make the songs from the Shared Folder become part of Windows Media Player 10 library?




    Friday, March 31, 2006 1:49 PM