search for: file_information

Displaying 1 result from an estimated 1 matches for "file_information".

2008 Apr 30
8
Playing with NtQueryInformationFile
...fh.puts "hello" handle = get_osfhandle(fh.fileno) if handle == INVALID_HANDLE_VALUE puts "ERROR, get_osfhandle() : " + get_last_error fh.close rescue nil File.delete(''test.txt'') exit end # Excessive but harmless (?) io_status_block = 0.chr * 512 file_information = 0.chr * 512 status = NtQueryInformationFile.call( handle, io_status_block, file_information, file_information.size, # FileStandardInformation # Doesn''t work as expected FileNameInformation # But this does ) if status != STATUS_SUCCESS puts "ERROR, NtQuer...