in reply to Re^3: From File to at Sectors on harddrive (Windows)
in thread From File to at Sectors on harddrive (Windows)

You can simplify your error handling. This:

DeviceIoControl($fh, FSCTL_GET_RETRIEVAL_POINTERS, $inBuf,length($inBuf), $outBuf,length($outBuf), $dwBytesReturned, []); my $error = Win32::GetLastError(); print "error-no: $error\n"; warn "DeviceIoControl->Call: ", Win32::FormatMessage($error) if ($er +ror);

can be replaced by:

DeviceIoControl($fh, FSCTL_GET_RETRIEVAL_POINTERS, $inBuf,length($inBuf), $outBuf,length($outBuf), $dwBytesReturned, [] ) or warn sprintf "DeviceIOControl failed with (%d) '%s'\n", $^E, $^E;

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP PCW It is as I've been saying!(Audio until 20090817)