Flash Lite 3.1 ActiveX控件 [英] Flash lite 3.1 activeX control
问题描述
当我在程序(Microsoft WTL c ++)中调用"flash lite 3.1 activeX控件"时,遇到了一些问题.我按照Windows xp上的惯例完成了操作,但是在WINCE平台上却无法正常工作.
如果有人对此有所了解,请提出一些建议. T
非常感谢!
//我使用oleview工具从flaxplayer_wince.dll中导出了一个.IDL文件,并在我的代码中使用了它.
//在下面的代码中播放.swf文件
When I call the "flash lite 3.1 activeX control" in my program(Microsoft WTL c++), I encountered some problems. I completed in accordance with the practice on windows xp, but in WINCE platform it could not work.
If someone knows something about this then please give some recommendations. T
Thanks very much!
//i used the oleview tool to export a .IDL file from flaxplayer_wince.dll, and used it in my code.
// to play a .swf file in below code
::CoInitialize( NULL );
// 创建IShockwaveFlash指针对象
::CoCreateInstance(__uuidof(ShockWaveFlash), NULL, CLSCTX_ALL, __uuidof(IShockWaveFlash), (LPVOID*)&spFlash);
if(spFlash == NULL){
RETAILMSG(1, (TEXT("CoCreateInstance flash error!!!\r\n")));
return FALSE;
}
RETAILMSG(1, (TEXT("1\r\n")));
ATLVERIFY(SUCCEEDED(spFlash->put_Menu(0)));
ATLVERIFY(SUCCEEDED(spFlash->put_AllowScriptAccess(L"always")));
ATLVERIFY(SUCCEEDED(spFlash->put_WMode(L"window")));
RETAILMSG(1, (TEXT("2\r\n")));
// 将IShockwaveFlash对象绑定到指定的窗口上
AtlAxAttachControl(spFlash, this->m_hWnd, NULL);
RETAILMSG(1, (TEXT("3\r\n")));
//And now, here always Data Abort
spFlash->put_Movie(_bstr_t(L"\\Storage Card\\wxzy.swf"));
RETAILMSG(1, (TEXT("4\r\n")));
spFlash->Play();
推荐答案
ActiveX是特定于平台的(二进制代码).您有WinCE的版本吗?如果不是这样,那很可能是您遇到问题的原因.
ActiveX are platform specific (it''s binary code). Do you have the version for WinCE ? If not, then that''s most probably the reason of your problem.
谢谢您的回答,但是我从flaxplayer_wince.dll中获得了.IDL文件(用于wince)并将其MIDL到.tlb文件,然后在我的项目中#import .tlb文件.这意味着它完全是一个wince版本.现在的问题是:正如上面的代码一样,我可以通过CLSID加载ActiveX(Flash Lite 3.1),并可以访问它的某些属性或方法,但是put_Movie方法始终满足flaxplayer_wince内部的数据中止例外. dll.
Thanks for your answer, But I got .IDL file from flaxplayer_wince.dll(it''s for wince) and MIDL it to .tlb file, and then #import the .tlb file in my project. That means it''s exactly a wince version. And nower the problem is : As the code above, I could load the ActiveX(flash lite 3.1) by the CLSID, and could access some properties or method of it, but put_Movie method, it met always the Data Abort excepion inside the flaxplayer_wince.dll.
Exception 'Data Abort' (4): Thread-Id=059d017e(pth=9fcdfb64), Proc-Id=058400da(pprc=99d37ce4) 'flashliteWTL.exe', VM-active=058400da(pprc=99d37ce4) 'flashliteWTL.exe'
PC=40062c10(coredll.dll+0x00052c10) RA=427d5cac(flaxplayer_wince.dll+0x00015cac) SP=0012dd5c, BVA=00000000
最重要的一点是,如果我删除AtlAxAttachControl的行,则put_Movie中不会发生任何事情(无任何异常).
有人可以告诉我,通过哪种方式可以找到期望的原因?还是我应该写信给微软?^.^
我现在真的快要难过了....
And the most important point is, if I delete the line of AtlAxAttachControl , nothing will happen in put_Movie (No any exception).
Could anybody tell me, by which way, I could find the reason of the expection? Or should I write a letter to microsoft?^.^
I''m really closeing to upset now....
我很高兴,我已经解决了这个问题.
我为wince使用了另一个版本的Flash lite,效果很好.
谢谢!
I''m so happy, I had handled this problem.
I use another version of flash lite for wince, and it works good.
Thanks!
这篇关于Flash Lite 3.1 ActiveX控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!