Limitation on Multiple File Selection using CFileDialog

  • Thread starter Thread starter pradyumna
  • Start date Start date
P

pradyumna

I have an application wherein I need to select multiple
files. I am using a CFileDialog class for opening
the 'Open file dialog' . However i cant seem to select
more than 2605 files. I mean i can select more than that
but the operation supports only 2605 files. Is it a limit
set by windows API on the number of files that can be
selected at once.
 
Hi,

Since FileDialog is just a wrapper for the Windows API functions
GetOpenFileName()/GetSaveFileName(), the same restrictions apply.
Specifically the nMaxFileTitle value of the OPENFILENAME structure indicates
how big is the buffer that will contains the names of the files selected by
the user. The .NET class is arbitrarily setting this value to 8K (8192
bytes), so maybe you reached this limit.

For more information please see the following document:

OPENFILENAME Structure
http://msdn.microsoft.com/library/d...ce/commondialogboxstructures/openfilename.asp

Regards,

Gabriele
 
Back
Top