Skip to main content
gajananah90329093
Participant
June 20, 2017
Question

Flash Player Activx Upgrade to version 26 is not working as expected

  • June 20, 2017
  • 1 reply
  • 386 views

Hi we have legacy VC++ based product which embeds Flash player in it . It was using Flashplayer ActivX version 15.0 . After upgrading to 26.0 it is not working as expected .

(Generated tli and tlh files and used in my application)

I am getting access denied exception in this line

  

int m_csLevel = 67;

  HRESULT hr = m_lpControl->LoadMovie (m_csLevel, CustomSWF);

Only if m_csLevel is 0 it is working file . Please let me know any other changes need to be done for upgrading from version 15 to version 26

Settings are as shown below

#define CFlashOle COleContainerWnd<ShockwaveFlashObjects::IShockwaveFlash>

//m_lpControl used to access IShockwaveFlash

bool COleFlashWnd::LoadCustomSWF (void)

{

  // Custom.swf only works upto version 8

  //

  if (m_swfVersion > 😎

  {

  const char* info =

  "<FlashInfo>"

  "  <EIAvailable>false</EIAvailable>"

  "  <CapVersion></CapVersion>"

  "  <SWFVersion></SWFVersion>"

  "</FlashInfo>";

  FSCommand ("Custom.Ready", info);

  TraceMsg ("%s: Exit - SWF is version %d; spoofing call the FSCommand()", funcName, m_swfVersion);

  return true;

  }

  // generate the name of the SWF

  // which will be located in the application folder

  //

  char CustomSWF[MAX_PATH];

  int n = ::GetModuleFileName (NULL, CustomSWF, sizeof(CustomSWF));

  while (--n >= 0)

  {

  char c = CustomSWF;

  if (c == '\\' || c == '/' || c == ':') break;

  }

  strcpy (CustomSWF+n+1, "Custom.swf");

  if (!Coolsign::FileUtils::FileExists (CustomSWF))

  {

  return false;

  }

  // load it at a non-root level

  //

   int m_csLevel = 67;

  HRESULT hr = m_lpControl->LoadMovie (m_csLevel, CustomSWF);

  if (FAILED (hr))

  {

  return false;

  }

  return true;

}

bool COleFlashWnd::OnInit (void)

{

  const char* funcName = "COleFlashWnd::OnInit()";

  m_flashVersion = m_lpControl->FlashVersion();

  m_lpControl->PutEmbedMovie (VARIANT_TRUE);

  m_lpControl->PutMenu (VARIANT_FALSE);

    m_lpControl->DisableLocalSecurity();

  m_lpControl->PutAllowNetworking (L"all");

  m_lpControl->PutAllowScriptAccess (L"always");

  m_lpControl->PutWMode (L"transparent");

  m_lpControl->PutScale (L"showAll");

  // connect up the event handler

  //

  hr = m_lpControl->QueryInterface (IID_IConnectionPointContainer, (void**)&m_lpConContainer);

  if (FAILED (hr))

  {

  SetErrorMsg ("failed to connect event handler; querying for the container");

  TraceMsg ("%s: Exit - %s", funcName, m_errorMsg.c_str());

  return false;

  }

  hr = m_lpConContainer->FindConnectionPoint (ShockwaveFlashObjects::DIID__IShockwaveFlashEvents, &m_lpConPoint);

  if (FAILED (hr))

  {

  SetErrorMsg ("failed to connect event handler; querying for the connection");

  TraceMsg ("%s: Exit - %s", funcName, m_errorMsg.c_str());

  return false;

  }

  hr = m_lpConPoint->Advise ((ShockwaveFlashObjects::_IShockwaveFlashEvents*)this, &m_dwConPointID);

  if (FAILED (hr))

  {

  SetErrorMsg ("failed to connect event handler; installing callback");

  TraceMsg ("%s: Exit - %s", funcName, m_errorMsg.c_str());

  return false;

  }

  // convert the given filename to an absolute filename

  //

  char absFilename[1024];

  if (!_fullpath (absFilename, m_filename, sizeof(absFilename)))

  {

  SetErrorMsgf ("failed to resolve filename; %s", m_filename.c_str());

  TraceMsg ("%s: Exit - %s", funcName, m_errorMsg.c_str());

  return false;

  }

  hr = m_lpOle->DoVerb (OLEIVERB_SHOW, NULL, (IOleClientSite*)this, 0, NULL, NULL);

  if (FAILED (hr)) { SetErrorMsg ("DoVerb(OLEIVERB_SHOW) failed");  return false; }

  m_lpControl->PutEmbedMovie (TRUE);

  // Stage3D feature introduced in Flash Player 11 (desktop) [ SWF version 13]

  //

  if(!CFlashOle::IsTransparent()  && m_swfVersion>=13)

  m_lpControl->PutWMode (L"gpu");

  // load the requested SWF file

  //

  hr = m_lpControl->LoadMovie (0, absFilename);

  if (FAILED (hr))

  {

  SetErrorMsgf ("failed to load file; %s", absFilename);

  TraceMsg ("%s: Exit - %s", funcName, m_errorMsg.c_str());

  return false;

  }

  long pctLoaded = m_lpControl->PercentLoaded();

  if (pctLoaded == 0)

  {

  SetErrorMsgf ("failed to load file; %s, %d%% loaded", absFilename, pctLoaded);

  TraceMsg ("%s: Exit - %s", funcName, m_errorMsg.c_str());

  return false;

  }

  // I don't want it to start playing right away

  // of course, timeless SWFs will ignore the request

  //

  StopImp();

  PutFrameNumImp (0);

  PutLoopImp (false);

  if (GetTotalFramesImp() != m_swfFrameCount)

  {

  SetErrorMsg ("misread header information");

  TraceMsg ("%s: Exit - %s", funcName, m_errorMsg.c_str());

  return false;

  }

  // set the initialize size of the control

  //

  if (!CFlashOle::ResizeImp (m_swfWidth, m_swfHeight))

  {

  TraceMsg ("%s: Exit - CFlashOle::Resize() failed", funcName);

  return false;

  }

  // load the Custom ActionScript classes

  //

  if (!LoadCustomSWF())

  {

  TraceMsg ("%s: Exit - LoadCoolSignSWF() failed", funcName);

  return false;

  }

Also when i play in loop during replay . I am seeing some white flash for 100ms for few older files.

This topic has been closed for replies.

1 reply

_maria_
Legend
June 20, 2017

Hi,

Please file a bug at https://tracker.adobe.com and include what you've posted here, so that it can be properly investigated.

Please note that Flash Player 15 was released at the end of 2014, so you're essentially missing 2.5 years of new and changed features, bug fixes, and security fixes.  Release notes for all releases are posted at Flash Player Release Notes .  In the interim, reviewing these, since version 15 was released should be able to help you troubleshoot the issue.

--

Maria

gajananah90329093
Participant
June 21, 2017

Hi,

As per your suggestion i have already reported a bug. I have gone through release notes too. Unfortunately i couldn't find anything which can resolve this issue .Is there any workaround available for this issue like alternate function to load swf using IshockWave.

Also found that same bug is reported 6 months  before  : Tracker .

_maria_
Legend
June 21, 2017

Please add your code to the bug record.  It's best to keep everything in one location, instead of having an engineering look for it in multiple locations.  Thank you.