When I use SHCreateStreamOnFileEx to create a stream with a long UNC path (WCHAR, like \?\UNC\localhost\long.......long.....path\abc.txt), I got error "0x80070003 The system cannot find the path specified. ".
Remarks The SHCreateStreamOnFileEx function extends the semantics of the STGM flags and produces the same effect as calling the CreateFile function.
From http://msdn.microsoft.com/en-us/library/windows/desktop/aa363858(v=vs.85).aspx, *lpFileName [in] 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. For more information, see Naming Files, Paths, and Namespaces.*
Anyone know how to let SHCreateStreamOnFileEx support long UNC path?
User contributions licensed under CC BY-SA 3.0