On Tue, 02 Mar 2010, Maurilio Longo wrote: Hi,
> > Also seems that flAttribute parameter has wrongly value. > > Without ORing with FILE_ARCHIVED and FILE_READONLY files with above > > attribute should be excluded. > > > bits 5..0 are MAY-have, that is, file name is returned either it has that > attribute set or it has not. If you want only those files with attributes set, > then you have to use must-have values, The description suggests that files with attribute READONLY or ARCHIVE are not shown if MAY bits are not set. It's not Clipper compatible behavior. So it should be definitely fixed or the description is wrong. > > BTW what errors do you have? > Error 8, that is ERROR_NOT_ENOUGH_MEMORY. Looks like some internal problem, i.e. with memory alignment. > With my last change, which uses a block obtained with a DosAlloc() with > OBJ_TILE, that is a block aligned to a 64Kb segment, in low memory and with > 16bit selectors set, it always works. This is on a SMP kernel searching for a > file on a samba share, so going throug IBM LanManager (aka CIFS client) which > is an old piece of code which might have some old 16bit/protect mode code > inside. > I'll commit this change shortly. If it's memory alignment problem then such modification should resolve it. Anyhow such things should be documented. > BTW, > firefox 3.x for OS/2 has this code > > if (isWSEB) > { > rc = DosFindFirst( filename, > &d->d_hdl, > FILE_DIRECTORY | FILE_HIDDEN, > &(d->d_entry.large), > sizeof(d->d_entry.large), > &numEntries, > FIL_STANDARDL); > } > else > { > rc = DosFindFirst( filename, > &d->d_hdl, > FILE_DIRECTORY | FILE_HIDDEN, > &(d->d_entry.small), > sizeof(d->d_entry.small), > &numEntries, > FIL_STANDARD); > } > > So it seems newer kernels can/have to(?) use the FIL_STANDARDL flag but, > maybe, they work with the old one as well (my kernel is the last one). I think that we should clean current file IO code and use only native OS2 API instead of current mixed OS2 and CRTL calls. We can also add support for 64bit file API if it's available in OS2. best regards, Przemek _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour