但是,同样的代码项目换了CE平台后重新编译,在CE6的机器上运行就出错,CE6的机器已经安装了CF3.5,CE6自带的播放器是Media Player 9,
跟踪调试发现错误停止在这行代码上:
Public MyPlayer As WMPLib.WindowsMediaPlayer
Public Function InitializeMediaPlayer() As Boolean
Try
MyPlayer = New WMPLib.WindowsMediaPlayer '<--- 运行到此处停止
MyPlayer.settings.autoStart = False
Return True
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "提示信息")
Return False
End Try
End Function