FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index Bugs report & fixes / Informe de errores y arreglos Video Player ActiveX no funciona en version 12.08 de FWH
Posts: 729
Joined: Tue Oct 18, 2005 06:49 PM
Video Player ActiveX no funciona en version 12.08 de FWH
Posted: Thu Oct 04, 2012 07:56 PM
Fivewin Team,
Reportando que al tratar de ejecutar el siguiente codigo:
Code (fw): Select all Collapse
#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
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Video Player ActiveX no funciona en version 12.08 de FWH
Posted: Sat Oct 06, 2012 12:55 PM

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

Posts: 729
Joined: Tue Oct 18, 2005 06:49 PM
Re: Video Player ActiveX no funciona en version 12.08 de FWH
Posted: Sat Oct 06, 2012 04:24 PM
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
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Video Player ActiveX no funciona en version 12.08 de FWH
Posted: Sat Oct 06, 2012 08:00 PM
George,

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

Code (fw): Select all Collapse
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
Posts: 729
Joined: Tue Oct 18, 2005 06:49 PM
Re: Video Player ActiveX no funciona en version 12.08 de FWH
Posted: Sat Oct 06, 2012 08:40 PM
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

Continue the discussion