|
2
|
| Georg Fritzsche · 技术社区 · 16 年前 |
|
|
1
3
wmp支持两种自动化方法,嵌入式activex或com服务器。 对于嵌入式应用,您可以通过对象标记(从bho/band通过ihtmlwindow2执行一些脚本)或隐藏表单添加activex,并从中自动执行。见 Using the Windows Media Player Control in a Web Page 和 Hosting the Windows Media Player Control in a Windows Application 用于示例代码。 对于COM服务器的使用,只需将播放器创建为COM服务器并从中自动执行。 你也可以 make it a UI-less playback engine 或 remote it so you have a full UI . windows media player以异步方式播放,例如,它可以调用imediacontrol::run,并在调用put_url时立即返回(另一个要播放的即时调用将失败,因为它已经在播放)。如果你不需要自动播放,我想你需要iwmpsettings::put_autostart。 wmp假设自己处于主线程中。如果您处于工作线程或MTA线程中,我建议您跨另一个进程将其自动化,或者将其作为进程外服务器进行远程。 |
|
|
2
0
后
further investigation
,这实际上是由vs2008s的vs2005解决方案引起的。
解决方案覆盖
|