How to trigger "running state" in Flash Player?

If I use windowed activation (giving a valid HWND to the Flash PLayer in the GetWindow function is enough to trigger this), the player will run the loaded swf file. However, if I use windowless activation, the loaded file does not run, only the very first frame is displayed. This article claims that I'm supposed to call

DoVerb(OLEIVERB_SHOW, NULL, (IOleClientSite *)this, 0, NULL, NULL);

However, this does not have any effect. What am I doing wrong?

Edit: Since I made this post, I found out that it returns -2147467259, which is not a known HRESULT, but certainly not 0. What does it mean?

After some more digging I found out that the return value is OLE_E_NOTRUNNING.


I have found the problem. Before this call, I was doing:

hr = _shockwaveFlash->put_WMode(BSTR("opaque"));

BUT I blatantly ignored the HRESULT there. It made the Flash Player confused, because it is not a valid way to insert a BSTR constant in the code (which is a wide string). Correctly:

hr = _shockwaveFlash->put_WMode(L"opaque");

Now it works as it should. Check you HRESULTs, kids :)

Need Your Help

App installation failed due to application-identifier entitlement

ios watchkit watch-os-2

I am unable to install a watchOS 2 WatchKit app due to an application-identifier entitlement. This happened after turning on App Groups in the Capabilities tab.

C# UWP Hide Soft Navigation Bar

c# windows-phone uwp

How can I hide/collapse the navigation bar programmatically at the bottom of the windows 10 (univeral windows platform) application that I am writing for phones?