Tim Roberts wrote: >Tim Riley wrote: > > >>Can anyone explain to me why the following code will return a list if >>I select 12 files but will return None if I select 13? >> >> > >It's an ugly but well-known limitation: the buffer passed to >CreateFileDialog is big, but not big enough. When you select more files >than will fit, the API returns an error, and the wrapper returns that >error instead of reallocating and retrying. >
Allow me to apologize to pywin32. The problem is not in the pywin32 wrapper, the problem is in MFC. Pywin32 uses the MFC CFileDialog class, and that class has a hard-coded 256-byte buffer for the file names. Pywin32 cannot "reallocate and retry"; the interface is simply not exposed. Roger Upole's advice is the best: use win32gui.GetOpenFileNameW. It's not quite as friendly, but it doesn't have the same limitation. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. _______________________________________________ Python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32
