Page 1 of 1

cGetFile function different version

Posted: Mon Mar 09, 2026 8:08 am
by richard-service

Dear Antonio,

I use this code within Old FWH version and New FWH version
I found New FWH version File Name show Empty. Look Left side.
Old FWH version can show it and no problem.

LOCAL cFile := "HpSA"+ALLTRIM(pcSysDate)+'_'+SUBS(pcSysDate,1,5)+'.csv'
LOCAL cINJDAT := ""


Code: Select all | Expand

       cINJDAT = cGetFile( cFile, "選擇存入目錄" )

This Old FWH version and Working.
Image

This New FWH version and not show File name.
Image


Re: cGetFile function different version

Posted: Mon Mar 09, 2026 1:53 pm
by Antonio Linares

Dear Richard,

It is a side effect bug due to the recent unicode support modifications.

Please modify this in source/winapi/getfile.c

Please replace this:
pFile = fw_parWideLen( 8, wLen * 2 ); //512 );

with this:
pFile = fw_parWideLen( IF( hb_pcount() > 7 && HB_ISCHAR( 8 ), 8, 1 ), wLen * 2 );

bug detected and solved by Antigravity :wink: