Page 1 of 1

Video Player ActiveX no funciona en version 12.08 de FWH

Posted: Thu Oct 04, 2012 7:56 pm
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

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

Posted: Sat Oct 06, 2012 12:55 pm
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

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

Posted: Sat Oct 06, 2012 4:24 pm
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

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

Posted: Sat Oct 06, 2012 8:00 pm
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

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

Posted: Sat Oct 06, 2012 8:40 pm
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