The link Texplorerbar from Andrés has broken

Post Reply
User avatar
fafi
Posts: 169
Joined: Mon Feb 25, 2008 2:42 am

The link Texplorerbar from Andrés has broken

Post by fafi »

Hello Andrés, or someone



Please help to send the right link

Regards
Fafi
User avatar
Antonio Linares
Site Admin
Posts: 42777
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 116 times
Been thanked: 110 times
Contact:

Re: The link Texplorerbar from Andrés has broken

Post by Antonio Linares »

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
anserkk
Posts: 1333
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India
Has thanked: 4 times

Re: The link Texplorerbar from Andrés has broken

Post by anserkk »

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
Enrico Maria Giordano
Posts: 8781
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 8 times
Contact:

Re: The link Texplorerbar from Andrés has broken

Post by Enrico Maria Giordano »

Yes, it must be recompiled with latest xHarbour.

EMG
User avatar
anserkk
Posts: 1333
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India
Has thanked: 4 times

Re: The link Texplorerbar from Andrés has broken

Post by anserkk »

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
Antonio Linares
Site Admin
Posts: 42777
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 116 times
Been thanked: 110 times
Contact:

Re: The link Texplorerbar from Andrés has broken

Post by Antonio Linares »

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


#pragma BEGINDUMP


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

#pragma ENDDUMP
 

Image

Code: Select all | Expand


//----------------------------------------------------------------------------//
//    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: 42777
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 116 times
Been thanked: 110 times
Contact:

Re: The link Texplorerbar from Andrés has broken

Post by Antonio Linares »

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


#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


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

Antonio Linares
www.fivetechsoft.com
User avatar
anserkk
Posts: 1333
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India
Has thanked: 4 times

Re: The link Texplorerbar from Andrés has broken

Post by anserkk »

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
Post Reply