Video Player ActiveX no funciona en version 12.08 de FWH

Video Player ActiveX no funciona en version 12.08 de FWH

Postby George » Thu Oct 04, 2012 7:56 pm

Fivewin Team,
Reportando que al tratar de ejecutar el siguiente codigo:
Code: Select all  Expand view
#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
George
 
Posts: 724
Joined: Tue Oct 18, 2005 6:49 pm

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

Postby Rick Lipkin » 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
User avatar
Rick Lipkin
 
Posts: 2606
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

Postby George » Sat Oct 06, 2012 4: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
George
 
Posts: 724
Joined: Tue Oct 18, 2005 6:49 pm

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

Postby Antonio Linares » Sat Oct 06, 2012 8:00 pm

George,

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

Code: Select all  Expand view
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
User avatar
Antonio Linares
Site Admin
 
Posts: 41206
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

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

Postby George » Sat Oct 06, 2012 8: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
George
 
Posts: 724
Joined: Tue Oct 18, 2005 6:49 pm


Return to Bugs report & fixes / Informe de errores y arreglos

Who is online

Users browsing this forum: No registered users and 3 guests