We have an windows form application that shows flash content. Until saterday 26th of december 2015 this worked perfectly.
now I get: A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in AxShockwaveFlashObjects.dll Additional information: The data necessary to complete this operation is not yet available. (Exception from HRESULT: 0x8000000A)
When I try to ask the TotalFrames from the control after loading. Did anybody experienced the same?
Windows Forms Code (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
End Sub
Found this at another website:
First, you will go to
Project>>Properties>>Linker>>System
, in the field "SubSystem" you choose "Windows (/SUBSYSTEM:WINDOWS)", click Apply. Then go toProject>>Properties>>Linker>>Advanced
, in the field "entry point", input value "Main" and Apply, finally click OK. After, you go go file code of form you created(ex: MyForm.cpp) and input code below to this fileusing namespace System; using namespace System::Windows::Forms; [STAThreadAttribute] void Main(array<String^>^ args) { Application::EnableVisualStyles(); Application::SetCompatibleTextRenderingDefault(false); Project1::MyForm form; Application::Run(%form); }
Save and exit visual studio, and then open it again, UI Form will work.
Original link: https://developercommunity.visualstudio.com/content/problem/59825/the-data-necessary-to-complete-this-operation-is-n.html
User contributions licensed under CC BY-SA 3.0