windows - Open Alternate Data Stream (ADS) from file handle or file ID -
i open alternate data stream of file using existing handle file, or using file id. way found full name (file name + ads name). afraid of file being renamed during operation.
is there way that?
this easy ntopenfile
or ntcreatefile
for example open existing ads on hfile
ntstatus openads(phandle filehandle, access_mask desiredaccess, handle hfile, pcwstr name) { io_status_block iosb; unicode_string objectname; rtlinitunicodestring(&objectname, name); object_attributes oa = { sizeof(oa), hfile, &objectname }; return ntopenfile(filehandle, desiredaccess, &oa, &iosb, file_share_valid_flags, file_synchronous_io_nonalert); }
where name
l":test_stream"
(begin :
)
Comments
Post a Comment