PRF Posted October 31, 2011 Share Posted October 31, 2011 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 More sharing options...
MilesAhead Posted November 1, 2011 Share Posted November 1, 2011 (edited) Looks like that's the way it is: http://msdn.microsoft.com/en-us/library/ms646839(v=VS.85).aspx If you scroll down near the bottom ... nMaxFile limit on XP .. 32K is i edit: It's "community content" section but since MS left it there I assume it's correct. Edited November 1, 2011 by MilesAhead My Freeware Page Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now