View Single Post
Old 16th December 2013, 05:28   #6
bnicer
Senior Member
 
Join Date: Feb 2005
Location: London
Posts: 218
I ran a few more UNICODE tests and will summarize the findings:

A) 'kernel32::CopyFile(t "C:\path\file.ext", t "C:\path2\file.ext", i 0)i.r0'
B) 'kernel32::CopyFile(t "C:\path\file.ext", t "\\?\C:\path-that-exceeds-256-characters\file.ext", i 0)i.r0'
C) 'kernel32::CopyFileW(t "C:\path\file.ext", t "C:\path2\file.ext", i 0)i.r0'
D) 'kernel32::CopyFileW(t "C:\path\file.ext", t "\\?\C:\path-that-exceeds-256-characters\file.ext", i 0)i.r0'

Out of A, B, C, D only A works. B returns an error, C creates 'C:\path2' but does not copy 'file.ext', and D does nothing.

E) 'kernel32::GetFileAttributes(t "C:\path-that-exceeds-256-characters\file.ext")i .R2'

E works too. In short, '\\?\' doesn't make much difference.
bnicer is offline   Reply With Quote