Video Player ActiveX no funciona en version 12.08 de FWH

Post Reply
George
Posts: 710
Joined: Tue Oct 18, 2005 6:49 pm

Video Player ActiveX no funciona en version 12.08 de FWH

Post by George »

Fivewin Team,
Reportando que al tratar de ejecutar el siguiente codigo:

Code: Select all

#include "Fivewin.ch"
static oWnd, oAct
Function main()
define window ownd
wmp("arquivo.mp4")  // Archivo de video 
activate window ownd
Return nil

function wmp( cFile )
oAct:=TActiveX():New( oWnd, "MediaPlayer.MediaPlayer.1")
oAct:SetProp( "FileName", cFile )
oWnd:oClient:=oAct
Return
No funciona con la version 12.08 de FWH.
Genera el siguiente mensaje:
Can't read types from ActiveX
Si uso la version FWH 10.10 funciona perfecto.

Estoy usando FWH con xHarbour comercial Oct 2011.

Gracias de antemano por su atencion.

George
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Video Player ActiveX no funciona en version 12.08 de FWH

Post by Rick Lipkin »

George

If you are trying to run this function on various machines, I am sure you realize that you will need the proper 'codec' ( for .mp4 ) and file association for Media player on each computer ...

Rick Lipkin
George
Posts: 710
Joined: Tue Oct 18, 2005 6:49 pm

Re: Video Player ActiveX no funciona en version 12.08 de FWH

Post by George »

Hi Rick,
Thanks for answer my post.
I am using Windows 7 and the software is running in the same machine.
The issue is that under FWH 12.08 + xHarbour Pro (commercial) the following error message is displaying:
Can't read types from ActiveX
After that a new dialog, with a [Close program] button, is displayed saying that the software has stopped working.

However if I am using FWH 10.10 + the same xHarbour Pro (commercial) the software works flawless.
Therefore I think, although I might be wrong, that some change from FWH 10.10 to FWH 12.08 is causing this problem.
I expect that Fivewin team can help us with a solution or information that can bring to solve this issue.

Regards,

George
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Video Player ActiveX no funciona en version 12.08 de FWH

Post by Antonio Linares »

George,

In Class TActiveX (source\classes\activex.prg) please comment these lines:

Code: Select all

METHOD OnEvent( nEvent, aParams, pParams ) CLASS TActiveX

   /*
   local nAt := AScan( ::aEvents, { | aEvent | aEvent[ 2 ] == nEvent } )
   local cEvent := If( nAt != 0, ::aEvents[ nAt ][ 1 ], "" )
   
   if ! Empty( ::bOnEvent )
      Eval( ::bOnEvent, If( ! Empty( cEvent ), cEvent, nEvent ), aParams, pParams )
   endif   
   */

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
George
Posts: 710
Joined: Tue Oct 18, 2005 6:49 pm

Re: Video Player ActiveX no funciona en version 12.08 de FWH

Post by George »

Thanks Antonio.
The error message continues displaying, but after closing the error message dialog, the video is displayed without any problem.

Comments in the following method in ActiveX.prg avoid the error message
//----------------------------------------------------------------------------//

METHOD ReadTypes() CLASS TActiveX

local oReg := TReg32():New( HKEY_CLASSES_ROOT, "CLSID\" + ::cString + ;
"\InprocServer32" )
local cTypeLib := oReg:Get( "" )

oReg:Close()

// if ! Empty( cTypeLib ) .and. File( cTypeLib )
// ::aEvents = ActXEvents( cTypeLib, ::hActiveX )
// endif

return nil

//----------------------------------------------------------------------------//
Regards,

George
Post Reply