Jump to content

OpenFIleDialog return buffer size on Win XP


PRF
 Share

Recommended Posts

My question concerns OpenFileDialog running on XP 32 bit SP2/SP3. I'm trying to retrieve multiple files from an XP folder. It seems the max number of text characters that the (XP OS???) buffer returns is about 32,000 characters (including the CRLF pair I assume). Anything beyond 32k it truncates. Win 7 (64bit) doesn't seem to truncate the text so I'm assuming the problem is with XP. I tried _WinAPI_GetOpenFileName and had the same problem (once i figured out how to change the buffer size from the default 4096 characters). Everything in my program works except for this.

Is there someway (or possibly a work around) to change the OS buffer size so it doesn't truncate the text?

Func SelectFiles()
Local $OutputFiles, $Path
$OutputFiles = FileOpenDialog("Select Files", @WorkingDir & "", "(*.mp3;*.mp4;*.m4a;*.wav;*.ogg;*.flv;*.avi;*.bin)", 4)
If @error Then
  Return 0
EndIf
If Not StringInStr($OutputFiles, "|", 0, -1) Then
  $OutputFiles = StringReplace($OutputFiles, "\", "|", -1)
EndIf
$OutputFiles = StringReplace($OutputFiles, ":\|", ":|", -1)
$OutputFiles = StringSplit($OutputFiles, "|")
$Path = $OutputFiles[1] & "\*"
For $Index = 2 To $OutputFiles[0] Step 1
  _ArrayAdd($OutEditArray, $Path & $OutputFiles[$Index])
Next
$OutEditArray[0] = UBound($OutEditArray) - 1
Return $OutEditArray[0]
EndFunc   ;==>SelectFiles
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...