Re: CFileDialog multi selection buffer!!!????

Tech-Archive recommends: Fix windows errors by optimizing your registry



It allocates a lot of unused memory, i was looking for somethings that let me
to allocate memory while users select files.
CFileDialog store the path of folder browsed and only the file name of
selected file that has usually less that _MAX_PATH chars...
Than, GetStartPosition() and GetNextPathName() will return the entire path
for each file.

Thanks
Ale

"jiangsheng[MVP]" wrote:

> Another undocumented way...
> http://blog.joycode.com/jiangsheng/archive/2004/11/22/39413.aspx
>
> "Ale" <Ale@xxxxxxxxxxxxxxxxxxxxxxxxx> дÈëÓʼþ
> news:26ACFCD7-8D0C-4785-A376-BF021EB7424F@xxxxxxxxxxxxxxxx
> > I use GetStartPosition() and GetNextPathName()...
> >
> > I really apologize for my english, i'll try to explain everything in other
> > way...
> >
> > What happen if user selects 1000000000 files !??? ;O)
> >
> > In any cases i've allocated a buffer large enought to store so many files
> > path string!!
> > In this case a MessageBox will display "to many files selected" message...
> >
> > I was looking a way to avoid this behavior...
> >
> > Here is the solution i've tought and found:
> > http://support.microsoft.com/default.aspx?scid=kb;en-us;131462
> >
> > Thanks to all
> > Ale
> >
> >
> >
> > "AliR" wrote:
> >
> > > What method are you using to get all the filenames???
> > > You need to use CFileDialog::GetStartPosition() and
> > > CFileDialog::GetNextPathName() to get multiple selections.
> > >
> > > AliR.
> > >
> > > "Ale" <Ale@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> > > news:D715F499-D648-424C-B7EF-AA798CF9C0E7@xxxxxxxxxxxxxxxx
> > > > Hi all,
> > > > using CFileDialog with MULTISLECT you need to allocate a buffer larger
> > > > enoght to store returnet file path list, if buffer is not larger
> enought
> > > > DoModal will return the specific error...
> > > > Now, how to get the buffer size needed before calling DoModa or during
> > > > selectionl!?
> > > > How do Windows handle this issue!!?
> > > >
> > > > Thanks
> > > > Ale
> > >
> > >
> > >
>
>
>
.