> The problem might be because the function writes the selected file name back > into arq
Great work! That behaviour is uncommon, but indeed stated in IUP docs! What should work is allocating a large string with newString(4048) and then assigning chars one by one, or maybe assigning string first, and then calling setLen() with large size. But such a low level interface in IUP is really an ugly trap.