Help for this page

Select Code to Download


  1. or download this
    use Win32API::File qw /:Func :IOCTL_DISK_ :MEDIA_TYPE :Misc/;
    use Data::Dumper;
    ...
    if ($uMediaType eq FixedMedia) {
        print "FixedMedia";
    }
    
  2. or download this
    my ($opBuffer, $lBytes, $olBytesRead);
    $lBytes = $uBytesPerSect;
    my $bool = ReadFile( $hObject, $opBuffer, $lBytes, $olBytesRead, []);
    
  3. or download this
    my $ivOffset = 25096704;
    my $uNewPos = SetFilePointer( $hObject, $ivOffset, [], FILE_CURRENT );
    + # change to use Win32API::File qw /:Func :IOCTL_DISK_ :MEDIA_TYPE :M
    +isc/;
    
  4. or download this
        if ($bool) {
            print $opBuffer . "\n";
    ...
        else {
            print "ERROR: $^E\n";
        }