aGetfiles bug

Re: aGetfiles bug

Postby byte-one » Wed Feb 13, 2019 12:10 pm

Ok, to test it, i require the function fw_wcslen()! Can somebody send me or show the place in source?
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: aGetfiles bug

Postby Giovany Vecchi » Wed Feb 13, 2019 4:39 pm

The problem is not in bytes, but in query length.
Example: If you select 60 files that are in the c: \ temp folder, it would look like this:
"c: \ temp \ archi01.txt" "c: \ temp \ archi02.txt" etc etc.
Each file would take 21 len characters ("'c: \ temp \ archi01.txt'") = 21
If the folder is of greater length Ex: c: \ My documents secrets, it would look like this:
"c: \ My documents secrets \ archi01.txt"
len ('"c: \ My documents secrets \ archi01.txt"') = 37

So if you put a higher value in:
pFile = fw_parWideLen (8, 65534); // 65534 would be the limit of 16 bits, I did not test greater than this value.

The return of the characters composition arranged in windows api will be treated with more space.

I did not go deep to study certainly what causes the error. I know I solved it this way.
User avatar
Giovany Vecchi
 
Posts: 223
Joined: Mon Jun 05, 2006 9:39 pm
Location: Brasil

Re: aGetfiles bug

Postby Antonio Linares » Wed Feb 13, 2019 4:47 pm

Günther,

Code: Select all  Expand view
size_t fw_wcslen( const wchar_t * s )
{
   const wchar_t *p;

   p = s;
   while (*p)
      p++;

   return p - s;
}
regards, saludos

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

Re: aGetfiles bug

Postby byte-one » Mon Mar 04, 2019 8:47 am

Antonio, now a have increased #define SIZE_IN_BYTES 153840
But that is not all. In HB_FUNC( CGETFILE ) i made this changes:
Code: Select all  Expand view
…...
    pDir        = fw_parWideLen( 4, 512 );
    wLen    = ( ( dwFlags & OFN_ALLOWMULTISELECT ) ? SIZE_IN_BYTES : 512 );   //reactivate
    pFile       = fw_parWideLen( 8, wLen );   //change
    pFilter = fw_parWideLen( 1, 800 );
    pText = ( LPSTR ) pFilter;
    for ( w = 0; w < 800; w++ )
…...
   ofn.nMaxFile        = wLen;     //change
…...
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: aGetfiles bug

Postby Antonio Linares » Mon Mar 04, 2019 9:20 am

Günther,

Is it working fine now ?

Many thanks for your great feedback :-)
regards, saludos

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

Re: aGetfiles bug

Postby byte-one » Mon Mar 04, 2019 10:31 am

I now can get many files ( 300 i have tested)!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: aGetfiles bug

Postby Antonio Linares » Mon Mar 04, 2019 11:10 am

Please email me your modified file, thanks!
regards, saludos

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

Re: aGetfiles bug

Postby byte-one » Mon Mar 04, 2019 12:06 pm

Antonio, sent!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: aGetfiles bug

Postby byte-one » Mon Apr 08, 2019 2:05 pm

Antonio, is this included in new version?
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: aGetfiles bug

Postby Antonio Linares » Mon Apr 08, 2019 2:44 pm

Günther,

No, it is not included yet. I am checking why it has not been included yet.

Please email it to me again, thanks
regards, saludos

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

Re: aGetfiles bug

Postby Antonio Linares » Tue Apr 09, 2019 4:55 am

We found your email and we are implementing it.

many thanks for the reminder
regards, saludos

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

Re: aGetfiles bug

Postby Ariel » Tue Jul 09, 2019 8:21 pm

Antonio,

no te olvides de incluir esto ya que a mi tmb me casca.

Gracias.!
Ariel
 
Posts: 376
Joined: Wed Nov 29, 2006 1:51 pm
Location: Rosario - Argentina

Re: aGetfiles bug

Postby byte-one » Wed Jul 10, 2019 12:40 pm

Please, what in english?
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 105 guests