Click here to Skip to main content
15,889,216 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
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
C#
::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();
Posted
Updated 21-Dec-10 0:40am
v5

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.
 
Share this answer
 
Comments
TalentMouse 21-Dec-10 22:08pm    
Thank you very much
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.

VB
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


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....
 
Share this answer
 
v2
I'm so happy, I had handled this problem.

I use another version of flash lite for wince, and it works good.

Thanks!
 
Share this answer
 
hi, I found the flaxplayer_wince.dll in wince6.0 R3, and have imported the tlb in my project, all the codes' compile and link is ok, and the play() function has been execute, but it seems the swf file can not be shown. I test my project in the device emulator. Please tell me what's your flash lite's version?
 
Share this answer
 
Comments
TalentMouse 23-Feb-11 5:48am    
HI, I'm sorry to realize your reply so late.
Make sure to add the flashlite feature in your NK. Was there any debug information?
The version I used maybe is 3.01.(I don't remember clearly) If you need that, write email to me ,I'll send to you .(some .dll files) . My email:winky_chen@163.com

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900