Click here to Skip to main content
15,891,981 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Win10 FileSystem: File / Path too long Pin
Randor 7-Mar-17 15:30
professional Randor 7-Mar-17 15:30 
GeneralRe: Win10 FileSystem: File / Path too long Pin
Mark_Wallace7-Mar-17 21:13
Mark_Wallace7-Mar-17 21:13 
GeneralRe: Win10 FileSystem: File / Path too long Pin
raddevus8-Mar-17 2:45
mvaraddevus8-Mar-17 2:45 
GeneralRe: Win10 FileSystem: File / Path too long Pin
Randor 8-Mar-17 8:23
professional Randor 8-Mar-17 8:23 
GeneralRe: Win10 FileSystem: File / Path too long Pin
raddevus8-Mar-17 8:45
mvaraddevus8-Mar-17 8:45 
GeneralRe: Win10 FileSystem: File / Path too long Pin
Randor 8-Mar-17 9:56
professional Randor 8-Mar-17 9:56 
GeneralRe: Win10 FileSystem: File / Path too long Pin
raddevus8-Mar-17 10:15
mvaraddevus8-Mar-17 10:15 
GeneralRe: Win10 FileSystem: File / Path too long Pin
Randor 8-Mar-17 11:12
professional Randor 8-Mar-17 11:12 
raddevus wrote:
Plus read the exact wording on lpFileName (not path) at the Microsoft docs:
Quote:
lpFileName [in]The name of the file or device to be created or opened. You may use either forward slashes (/) or backslashes (\) in this name.In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "\\?\" to the path.


I can see why this is unclear. Keep in mind that you can use CreateFile to open COM ports and various other devices. It can also be used to open files on storage devices. This is why it is important to train yourself to never pay any attention to any variable names.

Looks like the engineer decided to name that variable lpFileName when the variable is actually [drive][path][filename] or [IO device].

Even in Windows... Everything is a File[^].


Best Wishes,
-David Delaune
GeneralRe: Win10 FileSystem: File / Path too long Pin
raddevus8-Mar-17 11:28
mvaraddevus8-Mar-17 11:28 
GeneralRe: Win10 FileSystem: File / Path too long Pin
Randor 8-Mar-17 13:10
professional Randor 8-Mar-17 13:10 
GeneralFor My Birthday... Pin
Bootking7-Mar-17 3:23
Bootking7-Mar-17 3:23 
GeneralRe: For My Birthday... Pin
OriginalGriff7-Mar-17 3:31
mveOriginalGriff7-Mar-17 3:31 
GeneralRe: For My Birthday... Pin
Bootking7-Mar-17 3:37
Bootking7-Mar-17 3:37 
GeneralRe: For My Birthday... Pin
OriginalGriff7-Mar-17 3:55
mveOriginalGriff7-Mar-17 3:55 
GeneralRe: For My Birthday... Pin
Bootking7-Mar-17 4:06
Bootking7-Mar-17 4:06 
GeneralRe: For My Birthday... Pin
Midi_Mick7-Mar-17 3:31
professionalMidi_Mick7-Mar-17 3:31 
GeneralRe: For My Birthday... Pin
Bootking7-Mar-17 3:38
Bootking7-Mar-17 3:38 
GeneralRe: For My Birthday... Pin
Midi_Mick7-Mar-17 3:47
professionalMidi_Mick7-Mar-17 3:47 
GeneralRe: For My Birthday... Pin
DerekT-P7-Mar-17 3:38
professionalDerekT-P7-Mar-17 3:38 
GeneralRe: For My Birthday... Pin
Bootking7-Mar-17 3:50
Bootking7-Mar-17 3:50 
GeneralRe: For My Birthday... Pin
Mark_Wallace7-Mar-17 3:58
Mark_Wallace7-Mar-17 3:58 
JokeRe: For My Birthday... Pin
Daniel Pfeffer7-Mar-17 4:04
professionalDaniel Pfeffer7-Mar-17 4:04 
GeneralRe: For My Birthday... Pin
Indivara7-Mar-17 4:07
professionalIndivara7-Mar-17 4:07 
GeneralRe: For My Birthday... Pin
PIEBALDconsult7-Mar-17 4:32
mvePIEBALDconsult7-Mar-17 4:32 
GeneralRe: For My Birthday... Pin
Bootking7-Mar-17 4:41
Bootking7-Mar-17 4: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.