Yes, that worked to increase the buffer. Thank you, Tim. :)

Andrew

On Thu, May 24, 2018 at 12:10 PM, Tim Roberts <t...@probo.com> wrote:
> Andrew Ziem wrote:
>> When I select a few files, the dialog works, but when I select many
>> files, I get the following error. Do you have any advice?
>>
>> error: (12291, 'GetOpenFileNameW', 'No error message is available')
>>
>> Error 12291 is FNERR_BUFFERTOOSMALL
>
> Yes.  The code in win32gui.i only allocates a buffer of 1,024
> characters.  If you select more than that, you'll get FNERR_BUFFERTOOSMALL.
>
> There may be a slimy way to work around this.  The code allocates the
> larger of 1024 characters or the size of the File parameter.   You could
> try something like
>     win32gui.GetOpenFileName( None, File='\x00' * 2048, Flags=... )
>
> --
> Tim Roberts, t...@probo.com
> Providenza & Boekelheide, Inc.
>
> _______________________________________________
> python-win32 mailing list
> python-win32@python.org
> https://mail.python.org/mailman/listinfo/python-win32
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to