c# - How to get the QuickTime OCX control to register correctly and work in .Net -


initially quicktime ocx seemed briefly work. in visual studio did following:

  • added quicktime plugin control toolbox right-clicking in tools pane -> choose toolbox items -> com components -> check quicktime plugin control, ok.
  • dragged control toolbox empty form.

it showed panel quicktime logo. went code view , explored properties , methods via intellisense (i want automate aac encoding it).

after switching designer view, visual studio crashed, , since cannot work more. have removed references solution , restarted visual studio. tried remove , add control toolbox again (that part works) try drag form following error:

failed create component 'axhost'.  error message follows:  'system.invalidoperationexception: unable initialize component.    @ system.windows.forms.axhost.depersistcontrol()    @ system.windows.forms.axhost.activateaxcontrol()    @ system.windows.forms.axhost.transitionupto(int32 state)    @ system.windows.forms.axhost.createhandle()    @ system.windows.forms.control.createcontrol(boolean fignorevisible)    @ system.windows.forms.control.createcontrol()    @ system.windows.forms.control.controlcollection.add(control value)    @ system.windows.forms.form.controlcollection.add(control value)    @ system.windows.forms.design.parentcontroldesigner.addchildcontrol(control newchild)    @ system.windows.forms.design.parentcontroldesigner.addcontrol(control newchild, idictionary defaultvalues)    @ system.windows.forms.design.controldesigner.initializenewcomponent(idictionary defaultvalues)    @ system.windows.forms.design.axhostdesigner.initializenewcomponent(idictionary defaultvalues)' 

i tried repair of quicktime via control panel\all control panel items\programs , features -> repair, no avail.

then tried re registering dll:

regsvr32 "c:\program files (x86)\quicktime\qtplugin.ocx" 

result:

dllregisterserver in c:\program files (x86)\quicktime\qtplugin.ocx succeeded. 

retried using it, no luck, tried this:

regsvr32 /i "c:\program files (x86)\quicktime\qtplugin.ocx" 

result:

the module "c:\program files (x86)\quicktime\qtplugin.ocx" loaded entry-point dllinstall not found. make sure "c:\program files (x86)\quicktime\qtplugin.ocx" valid dll or ocx file , try again. 

not sure go here. worked briefly, broke, how fix?

apart original quicktime ocx issue, found invalidoperationexception system.windows.forms.axhost.depersistcontrol() occurred because activex control lack of ipersiststreaminit, ipersiststream or ipersiststorage interface. axhost requires 1 of these, make sure include 1 of these on creating atl activex control.

this answer people having troubles on adding custom atl activex controls winforms, me. msdn more details ipersist interfaces.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -