04-10-2010 04:38 PM
Hello,everyone:
I was adding a WMP ActiveX Control into my uir file . When I tried to register callback functions for control events , the callback registration functions always returned error code -2147220992, which probably meant "unknown error" ; The registration seemed to be failed, because the callback functions were not fired.
I tried with other kind of ActiveX controls and the registration of callbacks was successful.
I am using Windows 7 and CVI2009. The version of the WMP is 12.0.7600.16415( Obtained with WMPLib_IWMPPlayer2GetversionInfo() function ).
Could anyone offer any possible causes and solutions for this problem?
Thanks!
04-13-2010 02:05 PM
Hi Chen,
Have you tried this example program? I have CVI 2009 and Windows 7 and this works without any problems.
Cheers,
04-14-2010 11:31 AM
Hi, Michael
The example program works well. But there is no Callback registration function called in the program.
When I call callback reg function as " WMPLib_IWMPSliderCtrlEventsRegOnondragend (...)" , it returns an error.
There are callback reg functions for different events (see the picture below), but only those for "_WMPOCXEvents " work without problem. Others return errors.
I've found a way to avoid such problem in my program, but I think I should get you informed about it. Thanks for your attention!