search for: sysbuf

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

Did you mean: stsbuf
2007 Oct 09
5
Playing with ReadFileScatter()
...file, GENERIC_READ, FILE_SHARE_READ, nil, OPEN_EXISTING, FILE_FLAG_OVERLAPPED | FILE_FLAG_NO_BUFFERING, nil ) if handle == INVALID_HANDLE_VALUE raise SystemCallError.new(GetLastError()) end sysbuf = 0.chr * 40 GetSystemInfo(sysbuf) page_size = sysbuf[8,4].unpack(''L'')[0] # dwPageSize file_size = File.size(file) # FILE_SEGMENT_ELEMENT fse_struct = (0.chr * page_size) + (0.chr * 8) # Buffer + Align. seg_array = (0.chr * (file_size...