2

I am using Visual Studio 2012 Ultimate. I simply create a new Windows Application form, now when I move Shockwave Flash Object to my form I received the error Failed to create component 'AxHost'. I also download and install the Visual Basic 2010 and same thing is happening there.I also installed the latest .Net 4.5. What is missing in my PC or in my Project?

enter image description here

Tim Williams
  • 154,628
  • 8
  • 97
  • 125
Azam Alvi
  • 6,918
  • 8
  • 62
  • 89
  • The COM error code is very unusual, few Google hits and no answers. Very unlikely it has anything to do with Flash itself, this at best points towards an issue with the source control integration built into Visual Studio. Hard to make that rhyme with dragging a component from the toolbox however. But only lead you have, make sure that your source control is working properly and that you haven't checked-in the AxShockwaveFlashObjects.dll interop library. – Hans Passant Feb 22 '15 at 09:27

2 Answers2

1

To resolve this problem you should manualy register Flash ocx component.

To register ocx component you should use Regsvr32 (ms support):

Regsvr32 [/u] [/s] <OCX File Name>

Flash ocx file path is typically:

C:\Windows\System\Macromed\Flash (Windows 95, 98, WinME) C:\WinNT\System32\Macromed\Flash (Windows NT, 2000) C:\Windows\System32\Macromed\Flash (Windows XP, Vista, 7) C:\Windows\SysWOW64\Macromed\Flash (Vista, 7)

Example:

 regsvr32 C:\Windows\System32\Macromed\Flash\flash.ocx
kmatyaszek
  • 19,016
  • 9
  • 60
  • 65
  • I have register two files `regsvr32 C:\Windows\SysWOW64\Macromed\Flash\Flash32_16_0_0_305.ocx` and `regsvr32 C:\Windows\System32\Macromed\Flash\Flash64_16_0_0_305.ocx`. Both register successfully but still getting that error. – Azam Alvi Feb 22 '15 at 08:29
0

I found it's solution. I just rename the file Flash64_16_0_0_305.ocx to Flash32_16_0_0_305.ocx and then run both command in cmd

regsvr32 C:\Windows\SysWOW64\Macromed\Flash\Flash32_16_0_0_305.ocx  
regsvr32 C:\Windows\System32\Macromed\Flash\Flash32_16_0_0_305.ocx

and it's works fine.

Azam Alvi
  • 6,918
  • 8
  • 62
  • 89