I will using aGetfiles(). Now i see, that a selection over 15 files not possible. Over 15 files is a error "Abnormal program termination" or the program freezes!
I will using aGetfiles(). Now i see, that a selection over 15 files not possible. Over 15 files is a error "Abnormal program termination" or the program freezes!
Yes
That is the present limitation.
Thanks! Any solution in the future?
Günther,
In FWH getfile.c source code there is a:
Please try to increase its size and test it again, thanks
Antonio, the problem is not the number (15 is enough) of selectable files, it is the crash from the app!!!
Surely because it runs out of memory, thus try to increase that number...
Antonio, i have enough of memory. See so select in windows files to delete! We can select thousands of files...
Günther,
Please provide the instructions or a GIF showing how to reproduce the crash, thanks
Application Internal Error - C:\WGUN\GUN1\gun32.exe
Terminated at: 2019-01-19 19:38:54
Unrecoverable error 6005: Exception error:
Exception Code:C0000005 ACCESS_VIOLATION
Exception Address:0094AFA4
EAX:00310030 EBX:00CD3DC0 ECX:40000000 EDX:005F0037
ESI:006AFEF0 EDI:00000000 EBP:0014E108
CS:EIP:0094AFA4 SS:ESP:0014E0A0
DS:0023 ES:0023 FS:003B GS:0000
Flags:00010206
Exception Parameters: 00000000 00310034
CS:EIP: 8B 50 04 83 E2 F8 2B 55 0C 3B F2 76 09 89 45 FC
SS:ESP: 04B4CA58 00CD3DC0 00000110 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
…
…
Called from CGETFILE(0)
Called from AGETFILES(21) in .\source\winapi\GETFILES.PRG
//pFile = fw_parWideLen( 8, 512 );
//pFilter = fw_parWideLen( 1, 800 );
pFile = fw_parWideLen( 8, 4096 );
pFilter = fw_parWideLen( 1, 2400 ); pFile = ( LPSTR ) hb_xgrab( ( dwFlags & OFN_ALLOWMULTISELECT ) ? SIZE_IN_BYTES : 256 ); //too small for many files??
if ( hb_pcount() > 7 && HB_ISCHAR( 8 ) ) //this is size from inifile, for what??
{
wLen = min( ( unsigned long ) 255, hb_parclen( 8 ) );
memcpy( pFile, ( char * ) hb_parc( 8 ), wLen );
}
else
{
wLen = min( ( unsigned long ) 255, hb_parclen( 1 ) ); //this is size from mask, for what??
memcpy( pFile, ( char * ) hb_parc( 1 ), wLen );
}
* ( pFile + wLen ) = 0;Oh, sorry, i found in this moment, that the function is same as cgetfile()! I will try!
Can not compiling as i cannot find the c-function fw_wcslen()!?
I am checking it but it keeps GPFing for a very large amount of files
Only solution is to increase SIZE_IN_BYTES.
The limit is not the number of files. Size of text holding folder and file names.
This buffer should accommodate the directory names and file names selected.
There is always a finite limit.
No other changes are required