Tadas S
Tadas S

Reputation: 1962

NTFS + CreateFile: specify stream offset in pathname?

Is it possible to specify stream offset in the pathname when opening a NTFS file data stream via CreateFile?

What about if pathname starts with \\?\?

E.g. abcd.txt::$DATA specifies offset 0 at the unnamed stream*; is it possible to specify a different offset within the pathname**?

*technically, this also means offset equal to stream length in case WriteFile is called with append **without ever making use of SetFilePointer

Upvotes: 0

Views: 108

Answers (1)

Remy Lebeau
Remy Lebeau

Reputation: 598299

There is no syntax that lets you specify a stream offset in the pathname. See MSDN for the supported syntax:

File Streams

You must seek to the desired offset after opening the stream.

Upvotes: 5

Related Questions