FWH 26.03 betatesters wanted

User avatar
alerchster
Posts: 154
Joined: Mon Oct 22, 2012 4:43 pm

Re: FWH 26.03 betatesters wanted

Post by alerchster »

Language german,
BCC77064 compile, message is ok
MSVC32 compile, message is ok
MSVC64 compile, message is not ok
fwstring() for MSVC64bit seems not good for öäü..

msg_fwstring.prg

Code: Select all | Expand

// Typical exit message, from Windows!

#include "FiveWin.ch"

//----------------------------------------------------------------------------//

function Main()
   FWSetLanguage( 5 )  // 1 english, 2 spanish, 3 french, 5 german, 6 italian
   MsgYesNo( fwstring("Want to End ?" ) )
   
return nil //----------------------------------------------------------------------------//
Regards

Ing. Anton Lerchster
User avatar
alerchster
Posts: 154
Joined: Mon Oct 22, 2012 4:43 pm

Re: FWH 26.03 betatesters wanted

Post by alerchster »

fivedbu.prg

sprintf should be changed to sprintf_s
change code after line 364 with claude's answer

Code: Select all | Expand

#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
HB_FUNC( FW_EXITPROCESS ) { ExitProcess( 0 ); }
HB_FUNC( CCOMPILER )
{
   #ifdef __clang__
      hb_retc( "LLVM/Clang " __clang_version__ );
   #elif defined( __GNUC__ )
      hb_retc( "GCC " __VERSION__ );
   #elif defined( _MSC_VER )
      char buf[ 32 ];
      sprintf_s( buf, sizeof( buf ), "MSVC %d", _MSC_VER );
      hb_retc( buf );
   #elif defined( __BORLANDC__ )
      char buf[ 32 ];
      sprintf_s( buf, sizeof( buf ), "BCC 0x%04X", __BORLANDC__ );
      hb_retc( buf );
   #else
      hb_retc( "Unknown" );
   #endif
}
#pragma ENDDUMP
Regards

Ing. Anton Lerchster
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FWH 26.03 betatesters wanted

Post by Antonio Linares »

Dear Anton,

Do you have Claude code ? If not I strongly advise you to use it

You won't believe how powerful it is until you use it. It will change your programming experience for ever :wink: :idea:

Using Claude code now every Harbour and FWH user becomes a truly engineer to enhance our platform! :idea:

regards, saludos

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

Re: FWH 26.03 betatesters wanted

Post by Antonio Linares »

alerchster wrote: Wed Mar 25, 2026 5:50 pm

fivedbu.prg

sprintf should be changed to sprintf_s
change code after line 364 with claude's answer

Code: Select all | Expand

#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
HB_FUNC( FW_EXITPROCESS ) { ExitProcess( 0 ); }
HB_FUNC( CCOMPILER )
{
   #ifdef __clang__
      hb_retc( "LLVM/Clang " __clang_version__ );
   #elif defined( __GNUC__ )
      hb_retc( "GCC " __VERSION__ );
   #elif defined( _MSC_VER )
      char buf[ 32 ];
      sprintf_s( buf, sizeof( buf ), "MSVC %d", _MSC_VER );
      hb_retc( buf );
   #elif defined( __BORLANDC__ )
      char buf[ 32 ];
      sprintf_s( buf, sizeof( buf ), "BCC 0x%04X", __BORLANDC__ );
      hb_retc( buf );
   #else
      hb_retc( "Unknown" );
   #endif
}
#pragma ENDDUMP

Dear Anton,

Claude code analysis:

We don't need sprintf_s here because:

The buffer is 32 bytes and the output is at most 15 characters (e.g. "MSVC 1943", "BCC 0x0770"). There is zero
overflow risk.

Technical reasons to avoid it:

  1. Portability: sprintf_s is a Microsoft extension (Annex K of C11, which is optional). BCC32, GCC, and Clang on
    Windows don't implement it — the code won't compile on 4 of our 6 target compilers.

  2. No safety gain: sprintf_s guards against buffer overruns by taking sizeof(buf) as a parameter. When the format
    string is a fixed literal with a single %d or %04X and the buffer is 2x larger than needed, the check adds nothing.

  3. sprintf is standard C89: works on every compiler we support (BCC32, BCC32C/Clang, MSVC32, MSVC64, GCC32, GCC64).

    Bottom line: use sprintf for cross-compiler compatibility. Reserve sprintf_s for cases where the format string or data
    comes from user input and the buffer size is tight.

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
alerchster
Posts: 154
Joined: Mon Oct 22, 2012 4:43 pm

Re: FWH 26.03 betatesters wanted

Post by alerchster »

Dear Antonio,

Yes, I've been using Claude since December, first with the Pro plan and now with the Max plan. It's a fantastic tool and, as you've already mentioned, it transforms development from a programmer to an architect. It brought my local Ubuntu server online via Cloudflare and set up several dynamic websites for me with 2FA via email and then with Microsoft Authenticator, etc., using PHP and a MySQL database. It did require some tweaks, but it led to a positive result very quickly.

When compiling FiveDBU, I got a warning with MSVC that sprintf was insecure and should be replaced with sprintf_s. I then had Claude rewrite that part of the code to sprintf_s, and that was the result. I agree with you, it was just a warning and didn't affect the functionality in this case. :-)

Regards

Ing. Anton Lerchster
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FWH 26.03 betatesters wanted

Post by Antonio Linares »

There is a new FWH 26.03 beta ready

Please ask for it on whatsapp, thank you :idea: :)

regards, saludos

Antonio Linares
www.fivetechsoft.com
toninhofwi
Posts: 183
Joined: Tue Oct 18, 2005 10:01 am

Re: FWH 26.03 betatesters wanted

Post by toninhofwi »

Hi Mr Antonio,

Everything seems to be fine.
Some of the classes I customized had different function names—for example:
xChangeProc() is now xxChangeProc() — but I’ve already fixed that.

Is it just me, or does everything seem faster and smoother?

Anyway, congratulations on the great work.

I’ll get organized and send you the 170 euros for the product — it’s worth every penny.

🤩

Last edited by toninhofwi on Thu Mar 26, 2026 11:35 am, edited 1 time in total.
User avatar
NWKL
Posts: 39
Joined: Thu Aug 04, 2022 12:45 pm

Re: FWH 26.03 betatesters wanted

Post by NWKL »

HI, i want , thank you.

User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FWH 26.03 betatesters wanted

Post by Antonio Linares »

Please send a whatsapp to +34 722461100 :!: :)

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
richard-service
Posts: 868
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Contact:

Re: FWH 26.03 betatesters wanted

Post by richard-service »

Dear Antonio,

Please Look it.
I use New version Chinese input way, but not work
But I use Old version Chinese input way. It's working.
Image

Best Regards,

Richard

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit
MySQL v8.0
Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
User avatar
alerchster
Posts: 154
Joined: Mon Oct 22, 2012 4:43 pm

Re: FWH 26.03 betatesters wanted

Post by alerchster »

fivedbu.prg

compiled with BCC770 32 Bit runs OK
compiled with MSVC 32 and 64 Bit some Dialogs will not be shown
example: "Setup" "Preferences", Buttonbar "Search" and many more

fwstring with german "öäü" is now ok

Regards

Ing. Anton Lerchster
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FWH 26.03 betatesters wanted

Post by Antonio Linares »

richard-service wrote: Thu Mar 26, 2026 12:46 pm

Dear Antonio,

Please Look it.
I use New version Chinese input way, but not work
But I use Old version Chinese input way. It's working.
Image

Please check your email, thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
richard-service
Posts: 868
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Contact:

Re: FWH 26.03 betatesters wanted

Post by richard-service »

Antonio Linares wrote: Thu Mar 26, 2026 4:28 pm
richard-service wrote: Thu Mar 26, 2026 12:46 pm

Dear Antonio,

Please Look it.
I use New version Chinese input way, but not work
But I use Old version Chinese input way. It's working.
Image

Please check your email, thanks

Ok. I got it. and Check solution it.

Best Regards,

Richard

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit
MySQL v8.0
Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
User avatar
carlos vargas
Posts: 1815
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: FWH 26.03 betatesters wanted

Post by carlos vargas »

la compilación codicional para bcc32c de Borland es:

#if defined(BORLANDC) && defined(clang) && defined(WIN32) && !defined(WIN64)
// Your code.
#endif

y esta es para bcc64:

#if defined(BORLANDC) && defined(clang) && defined(_WIN64)
// Your code.
#endif

Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
Post Reply