FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour The link Texplorerbar from Andrés has broken
Posts: 169
Joined: Mon Feb 25, 2008 02:42 AM
The link Texplorerbar from Andrés has broken
Posted: Mon Mar 02, 2009 10:59 PM
Hello Andrés, or someone

Broken link :
http://boxstr.com/files/2479495_kzhfp/TExplorerBar.zip
http://boxstr.com/files/2482681_3inb7/Codigobase%20COFF.zip


Please help to send the right link

Regards
Fafi
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: The link Texplorerbar from Andrés has broken
Posted: Wed Mar 25, 2009 11:15 PM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: The link Texplorerbar from Andrés has broken
Posted: 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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: The link Texplorerbar from Andrés has broken
Posted: Tue Sep 08, 2009 11:46 AM

Yes, it must be recompiled with latest xHarbour.

EMG

Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: The link Texplorerbar from Andrés has broken
Posted: 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

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: The link Texplorerbar from Andrés has broken
Posted: Tue Sep 08, 2009 03: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 (fw): Select all Collapse
#pragma BEGINDUMP


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

#pragma ENDDUMP


Code (fw): Select all Collapse
//----------------------------------------------------------------------------//
//    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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: The link Texplorerbar from Andrés has broken
Posted: Tue Sep 08, 2009 04: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 (fw): Select all Collapse
#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 (fw): Select all Collapse
   if( strncmp( szText, "Module:", 7 ) == 0 ) // pcode version
      return;
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: The link Texplorerbar from Andrés has broken
Posted: Wed Sep 09, 2009 04: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

Continue the discussion