我们有一个显示 Flash 内容的 Windows 窗体应用程序。直到 2015 年 12 月 26 日星期六,这一切都很好。
现在我得到:AxShockwaveFlashObjects.dll 中发生了“System.Runtime.InteropServices.COMException”类型的第一次机会异常附加信息:完成此操作所需的数据尚不可用。(来自 HRESULT 的异常:0x8000000A)
当我尝试在加载后从控件中询问 TotalFrames 时。有没有人有同样的经历?
Windows 窗体代码(Visual Studio 2015):
Private WithEvents FlashControl As AxShockwaveFlashObjects.AxShockwaveFlash = Nothing
Private Sub Form1_VisibleChanged(sender As Object, e As EventArgs) Handles Me.VisibleChanged On Error Resume Next
FlashControl = New AxShockwaveFlashObjects.AxShockwaveFlash
FlashControl.Name = System.Guid.NewGuid.ToString
FlashControl.Size = New System.Drawing.Size(500, 300)
Me.Controls.Add(FlashControl)
FlashControl.CreateControl()
If FlashControl.Created Then
FlashControl.LoadMovie(0, "C:\ProgramData\PADS\Content\nds1011_contentorganizer\General-testfiles\studenthealthpack.swf")
System.Threading.Thread.Sleep(2000)
Dim GetTotalFrames As Long = 0
If FlashControl.TotalFrames <> 0 Then
GetTotalFrames = FlashControl.TotalFrames
Else
GetTotalFrames = 0
End If
FlashControl.Play()
End If
结束子