The link Texplorerbar from Andrés has broken

The link Texplorerbar from Andrés has broken

Postby fafi » Mon Mar 02, 2009 10:59 pm

Hello Andrés, or someone



Please help to send the right link

Regards
Fafi
User avatar
fafi
 
Posts: 169
Joined: Mon Feb 25, 2008 2:42 am

Re: The link Texplorerbar from Andrés has broken

Postby Antonio Linares » Wed Mar 25, 2009 11:15 pm

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41866
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: The link Texplorerbar from Andrés has broken

Postby anserkk » Tue Sep 08, 2009 11:32 am

The TExplorerBar class lib (codigobase.lib) no more works with FWH 9.06 onwards. Anyway it is not working with FWH 9.08. I get the following error message.

I have an app in which I have used this class. Now I am trying to rebuild the app using FWH 9.08. Unfortunately I get the following error while running the exe

Unrecoverable error 9000
Module 'Source\texplorerbar.Prg' was compiled into PCODE version : 9, this version of xHarbour expects version : 10


Is there any way/trick to avoid this error and compile my project with FWH 9.08 ? Or is it necessary that I should get the TExplorerBar Class lib regenerated by the owner of the Class TExplorerBar to make it compatible with the latest FWH 9.08?.

Regards
Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: The link Texplorerbar from Andrés has broken

Postby Enrico Maria Giordano » Tue Sep 08, 2009 11:46 am

Yes, it must be recompiled with latest xHarbour.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8541
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: The link Texplorerbar from Andrés has broken

Postby anserkk » Tue Sep 08, 2009 12:08 pm

Thank you EMG for the info. :)

Now the only option left is to either request the owner of the class to provide the lib after recompiling it with latest xHarbour
OR
use the old FWH/xHarbour version set :(

Regards
Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: The link Texplorerbar from Andrés has broken

Postby Antonio Linares » Tue Sep 08, 2009 3:43 pm

Anser,

This is a very dirty and dangerous hack but it may help you meanwhile you get it :-)

Just add this code to your main PRG:
Code: Select all  Expand view

#pragma BEGINDUMP


void hb_errInternal( ULONG ulIntCode, const char * szText, const char * szPar1, const char * szPar2 )
{
}

#pragma ENDDUMP
 

Image
Code: Select all  Expand view

//----------------------------------------------------------------------------//
//    ExpBar.prg - Ejemplo de uso de la clase TExplorerBar
//----------------------------------------------------------------------------//
#include "fivewin.ch"

PROCEDURE Main()

   LOCAL oWnd, oBar, oPanel
   LOCAL bClick := {|o| MsgInfo( HB_PCODEVER() ) }
   ...
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41866
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: The link Texplorerbar from Andrés has broken

Postby Antonio Linares » Tue Sep 08, 2009 4:56 pm

This is a better hack as it processes internal errors and just avoid the pcode version error. It is the same code used in xHarbour with a little modification:
Code: Select all  Expand view

#pragma BEGINDUMP

#include "hbapifs.h"
#include "hbapilng.h"
#include <windows.h>

void hb_errInternal( ULONG ulIntCode, const char * szText, const char * szPar1, const char * szPar2 )
{
   char title[64], buffer[ 1024 ];
   FILE *fpError;
   BOOL bLang;

   HB_TRACE(HB_TR_DEBUG, ("hb_errInternal(%lu, %s, %s, %s)", ulIntCode, szText, szPar1, szPar2));

   if( strncmp( szText, "Module:", 7 ) == 0 ) // pcode version
      return;

   bLang = ( hb_langID() != NULL );

   if( szText )
   {
      fpError = hb_fopen( "error.log", "a" );

      if( fpError )
      {
         fclose( fpError );
         TraceLog( "error.log", szText, szPar1, szPar2 );
      }
   }

   hb_conOutErr( hb_conNewLine(), 0 );

   hb_snprintf( title, sizeof( title ), bLang ?
                      ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_ERRINTR ) :
                      "Unrecoverable error %lu: ", ulIntCode );

   hb_conOutErr( title, 0 );

   if( szText != NULL )
   {
      hb_snprintf( buffer, sizeof( buffer ), szText, szPar1, szPar2 );
   }
   else if (bLang)
   {
      hb_snprintf( buffer, sizeof( buffer ), ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_ERRINTR + ulIntCode - 9000 ), szPar1, szPar2 );
   }

   hb_conOutErr( buffer, 0 );
   hb_conOutErr( hb_conNewLine(), 0 );
   hb_stackDispCall();

   #ifdef HB_OS_WIN_32
      MessageBox( NULL, buffer, title, MB_ICONSTOP );
   #endif

   /* release console settings */
   hb_conRelease();

   if( hb_cmdargCheck( "ERRGPF" ) )
   {
       int *pGPF = NULL;
       *pGPF = 0;
       *(--pGPF) = 0;
   }

   #if defined( HB_THREAD_SUPPORT ) && defined( HB_OS_OS2 )
      /* Post all threads waiting on an indefinite wait */
      DosPostEventSem(hb_hevWakeUpAll);
      /* Let's give them some time to wake up */
      DosSleep(5000);
      /* Stop VM, I cannot call exit() here or I end up with a zombie process */
      hb_vmQuit();
   #endif

   exit( EXIT_FAILURE );
}

#pragma ENDDUMP
 

This is the only change in it:
Code: Select all  Expand view

   if( strncmp( szText, "Module:", 7 ) == 0 ) // pcode version
      return;
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41866
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: The link Texplorerbar from Andrés has broken

Postby anserkk » Wed Sep 09, 2009 4:26 am

Dear Mr.Antonio,

Your solution worked perfectly. As you said, till the owner of the CLASS TExplorerBar release a new lib, this solution can be used as a work around.

Regards
Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 72 guests