Click here to Skip to main content
15,868,016 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: FindFirstFileEx() and Unicode Pin
Garth J Lancaster4-Jun-13 12:41
professionalGarth J Lancaster4-Jun-13 12:41 
GeneralRe: FindFirstFileEx() and Unicode Pin
treddie4-Jun-13 16:25
treddie4-Jun-13 16:25 
GeneralRe: FindFirstFileEx() and Unicode Pin
Dave Kreskowiak4-Jun-13 12:54
mveDave Kreskowiak4-Jun-13 12:54 
GeneralRe: FindFirstFileEx() and Unicode Pin
treddie4-Jun-13 16:47
treddie4-Jun-13 16:47 
GeneralRe: FindFirstFileEx() and Unicode Pin
Dave Kreskowiak4-Jun-13 17:37
mveDave Kreskowiak4-Jun-13 17:37 
GeneralRe: FindFirstFileEx() and Unicode Pin
treddie4-Jun-13 19:17
treddie4-Jun-13 19:17 
GeneralRe: FindFirstFileEx() and Unicode Pin
Dave Kreskowiak4-Jun-13 12:44
mveDave Kreskowiak4-Jun-13 12:44 
GeneralRe: FindFirstFileEx() and Unicode Pin
treddie4-Jun-13 17:11
treddie4-Jun-13 17:11 
Dave Kreskowiak wrote:
I also found through tests that the TRUE limit for Windows, is 240 characters

max.


I'm not so sure about that, Dave. I ran some extensive tests many months ago when working on this program and found that there are 4 Windows limits. Their numbers are as follows, according to MS:
Folder name = 260 characters
File name (w/ extension) = 260 characters
Folder path w/o file name = 260 characters
Full path w/ filename = 260 characters

Obviously you can't have 260 in all categories so it's a matter of whatever the actual amounts are for each category, that they don't exceed any of the 4 limits.

At any rate, I tested all 4 cases and found that when you subtract out the twelve 8.3-filename chars, the 3 root characters, and the null character at the end of any path (all the characters the user has no control over), you are left with at that point only 244 characters, including backslashes, that you can play with. But, you have to actually limit yourself to 240 maximum, user-controlled characters to prevent the Windows crash on folder/file name right-click -> properties. I think that last case classifies as a bug in that your Windows session gets trashed if you go over 240 characters when getting a file's properties.

This was true in my tests for both WinXP (latest SP), and Win7 (6.1.7600 Build 7600), although the manner of the crash was different for each system. The WinXP crash was really bad and would hang the computer.
GeneralRe: FindFirstFileEx() and Unicode Pin
MicroVirus5-Jun-13 7:32
MicroVirus5-Jun-13 7:32 
GeneralRe: FindFirstFileEx() and Unicode Pin
Dave Kreskowiak5-Jun-13 9:46
mveDave Kreskowiak5-Jun-13 9:46 
GeneralRe: FindFirstFileEx() and Unicode Pin
treddie5-Jun-13 16:29
treddie5-Jun-13 16:29 
GeneralRe: FindFirstFileEx() and Unicode Pin
treddie6-Jun-13 8:15
treddie6-Jun-13 8:15 
GeneralRe: FindFirstFileEx() and Unicode Pin
Dave Kreskowiak6-Jun-13 10:10
mveDave Kreskowiak6-Jun-13 10:10 
GeneralRe: FindFirstFileEx() and Unicode Pin
treddie6-Jun-13 11:16
treddie6-Jun-13 11:16 
AnswerRe: FindFirstFileEx() and Unicode Pin
Alan N6-Jun-13 13:27
Alan N6-Jun-13 13:27 
GeneralRe: FindFirstFileEx() and Unicode Pin
treddie6-Jun-13 14:13
treddie6-Jun-13 14:13 
AnswerRe: FindFirstFileEx() and Unicode Pin
TnTinMn5-Jun-13 18:14
TnTinMn5-Jun-13 18:14 
GeneralRe: FindFirstFileEx() and Unicode Pin
treddie6-Jun-13 8:08
treddie6-Jun-13 8:08 
GeneralRe: FindFirstFileEx() and Unicode Pin
TnTinMn6-Jun-13 8:22
TnTinMn6-Jun-13 8:22 
GeneralRe: FindFirstFileEx() and Unicode Pin
treddie6-Jun-13 8:53
treddie6-Jun-13 8:53 
GeneralRe: FindFirstFileEx() and Unicode Pin
TnTinMn6-Jun-13 9:17
TnTinMn6-Jun-13 9:17 
GeneralRe: FindFirstFileEx() and Unicode Pin
treddie6-Jun-13 10:07
treddie6-Jun-13 10:07 
GeneralRe: FindFirstFileEx() and Unicode Pin
treddie6-Jun-13 14:29
treddie6-Jun-13 14:29 
GeneralRe: FindFirstFileEx() and Unicode Pin
TnTinMn6-Jun-13 15:06
TnTinMn6-Jun-13 15:06 
GeneralRe: FindFirstFileEx() and Unicode Pin
TnTinMn6-Jun-13 15:41
TnTinMn6-Jun-13 15:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.