'Win32API::File' =>
{
'MAINTAINER' => 'chorny',
- 'DISTRIBUTION' => 'CHORNY/Win32API-File-0.1101.zip',
+ 'DISTRIBUTION' => 'CHORNY/Win32API-File-0.1200.tar.gz',
'FILES' => q[cpan/Win32API-File],
'EXCLUDED' => [ qr{^ex/},
qw{t/pod.t},
Revision history for Perl extension Win32API::File.
+0.1200 by Alexandr Ciornii 2011-07-01
+ - Spelling fixes by Peter John Acklam
+ - Upgraded Makefile.PL
+ - Don't bother checking $[
+
+0.1101_01 by Alexandr Ciornii 2011-02-26
+ - More metadata in META.yml
+ - [Set|Get]StdHandle functions added (Chris 'BinGOs' Williams)
+
0.1101 by Alexandr Ciornii 2008-11-17
- require Win32.pm (not core on Cygwin 5.8.8)
- file.t uses Win32.pm only if necessary
use vars qw( $VERSION @ISA );
use vars qw( @EXPORT @EXPORT_OK @EXPORT_FAIL %EXPORT_TAGS );
-$VERSION= '0.1101';
+$VERSION= '0.1200';
use base qw( Exporter DynaLoader Tie::Handle IO::File );
my $self = shift;
my $line = "";
- while ((index $line, $/) == $[-1) { # read until end of line marker
+ while ((index $line, $/) == -1) { # read until end of line marker
my $char = $self->GETC();
last if !defined $char || $char eq '';
C<$uFlags> is an unsigned value having zero or more of the bits
C<HANDLE_FLAG_INHERIT> and C<HANDLE_FLAG_PROTECT_FROM_CLOSE> set.
For each bit set in C<$uMask>, the cooresponding bit in the handle's
-flags is set to the value of the cooresponding bit in C<$uFlags>.
+flags is set to the value of the corresponding bit in C<$uFlags>.
If C<$uOldFlags> were the value of the handle's flags before the
call to C<SetHandleInformation>, then the value of the handle's
Allows the device's media to be locked or unlocked. C<$opOutBuf> should
be C<[]>. C<$pInBuf> should be a C<PREVENT_MEDIA_REMOVAL> data structure,
-which is simply an interger containing a boolean value:
+which is simply an integer containing a boolean value:
$pInBuf= pack( "i", $bPreventMediaRemoval );
physical drive devices like C<"//./PhysicalDrive0">. However,
C<IOCTL_DISK_GET_PARTITION_INFO> and C<IOCTL_DISK_SET_PARTITION_INFO>
should only be used on a single-partition device like C<"//./C:">. Also,
-C<IOCTL_DISK_GET_MEDIA_TYPES> is documented as having been superceded but
+C<IOCTL_DISK_GET_MEDIA_TYPES> is documented as having been superseded but
is still useful when used on a floppy device like C<"//./A:">.
Includes C<IOCTL_DISK_FORMAT_TRACKS>, C<IOCTL_DISK_FORMAT_TRACKS_EX>,
=item C<$ucHiddenSects>
The number of "hidden" sectors for this partition. Actually this is
-the number of sectors found prior to this partiton, that is, the
+the number of sectors found prior to this partition, that is, the
starting offset [as found in C<$uStartLow> and C<$ivStartHigh>]
divided by the number of bytes per sector.
The sequence number of this partition. Partitions are numbered
starting as C<1> [with "partition 0" meaning the entire disk].
Sometimes this field may be C<0> and you'll have to infer the
-partition sequence number from how many partitions preceed it on
+partition sequence number from how many partitions precede it on
the disk.
=item C<$uPartitionType>
=item DISK_LOGGING_DUMP
-Copy the interal log into the supplied buffer:
+Copy the internal log into the supplied buffer:
$pLogBuffer= ' ' x $uLogBufferSize
$pInBuf= pack( "C P L", 2, $pLogBuffer, $uLogBufferSize );
=head1 AUTHOR
-Tye McQueen, tye@metronet.com, http://www.metronet.com/~tye/.
+Tye McQueen, tye@metronet.com, http://perlmonks.org/?node=tye.
=head1 SEE ALSO
OUTPUT:
RETVAL
ouBytesWritten
+
+void
+GetStdHandle(fd)
+ DWORD fd
+PPCODE:
+#ifdef _WIN64
+ XSRETURN_IV((DWORD_PTR)GetStdHandle(fd));
+#else
+ XSRETURN_IV((DWORD)GetStdHandle(fd));
+#endif
+
+void
+SetStdHandle(fd,handle)
+ DWORD fd
+ HANDLE handle
+PPCODE:
+ if (SetStdHandle(fd, handle))
+ XSRETURN_YES;
+ else
+ XSRETURN_NO;
die "OS unsupported\n";
}
-WriteMakefile(
+WriteMakefile1(
'NAME' => 'Win32API::File',
'VERSION_FROM' => 'File.pm', # finds $VERSION
( $Config{archname} =~ /-object\b/i ? ( 'CAPI' => 'TRUE' ) : () ),
},
( ! $Config{libperl} ? () : ( LIBPERL_A => $Config{libperl} ) ),
'INSTALLDIRS' => ($] >= 5.008009 ? 'perl' : 'site'),
- ($ExtUtils::MakeMaker::VERSION ge '6.31'?
- ('LICENSE' => 'perl', ) : ()),
- ($ExtUtils::MakeMaker::VERSION ge '6.48'?
- ('MIN_PERL_VERSION' => 5.001,) : ()),
+ 'LICENSE' => 'perl',
+ 'MIN_PERL_VERSION' => 5.001,
'PREREQ_PM' => {
- 'IO::File' => 0, #build
- 'File::Spec' => 0, #build
'Math::BigInt' => 0,
'Win32' => 0,
- }
+ },
+ BUILD_REQUIRES => {
+ 'IO::File' => 0,
+ 'File::Spec' => 0,
+ },
+
+ META_MERGE => {
+ resources => {
+ repository => 'http://github.com/chorny/Win32API-File',
+ },
+ },
+ $^O =~/win/i ? (
+ dist => {
+ TAR => 'ptar',
+ TARFLAGS => '-c -C -f',
+ },
+ ) : (),
);
# Replacement for MakeMaker's "const2perl section" for versions
$self->{RM_F} @realclean\n" if @realclean;
return join('',@m);
}
+
+sub WriteMakefile1 { #Written by Alexandr Ciornii, version 0.21. Added by eumm-upgrade.
+ my %params=@_;
+ my $eumm_version=$ExtUtils::MakeMaker::VERSION;
+ $eumm_version=eval $eumm_version;
+ die "EXTRA_META is deprecated" if exists $params{EXTRA_META};
+ die "License not specified" if not exists $params{LICENSE};
+ if ($params{BUILD_REQUIRES} and $eumm_version < 6.5503) {
+ #EUMM 6.5502 has problems with BUILD_REQUIRES
+ $params{PREREQ_PM}={ %{$params{PREREQ_PM} || {}} , %{$params{BUILD_REQUIRES}} };
+ delete $params{BUILD_REQUIRES};
+ }
+ delete $params{CONFIGURE_REQUIRES} if $eumm_version < 6.52;
+ delete $params{MIN_PERL_VERSION} if $eumm_version < 6.48;
+ delete $params{META_MERGE} if $eumm_version < 6.46;
+ delete $params{META_ADD} if $eumm_version < 6.46;
+ delete $params{LICENSE} if $eumm_version < 6.31;
+ delete $params{AUTHOR} if $] < 5.005;
+ delete $params{ABSTRACT_FROM} if $] < 5.005;
+ delete $params{BINARY_LOCATION} if $] < 5.005;
+
+ WriteMakefile(%params);
+}
+
-Win32API::File v0.08 -- Low-level access to Win32 API calls for files.
+Win32API::File v0.1200 -- Low-level access to Win32 API calls for files.
New since v0.07:
http://perlmonks.org/index.pl?node=Seekers%20of%20Perl%20Wisdom
-Tye McQueen, tye@metronet.com, http://www.metronet.com/~tye/.
+Tye McQueen, tye@metronet.com, http://perlmonks.org/?node=tye.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
* the size of the written data. This is what the trunc_*() macros are for.
*
* The size sometimes does and sometimes doesn't include the trailing '\0'
- * [or L'\0'], so we always add or substract 1 in the appropriate places so
+ * [or L'\0'], so we always add or subtract 1 in the appropriate places so
* we don't care about this detail.
*
* A call may 1) request a pointer to the buffer size which means that
*
* The user can pass in C<[]> or C<0> to indicate that they don't care about
* the buffer size [we aren't programming in C here, after all] and just try
- * to get the data. This will work if either the buffer already alloated for
+ * to get the data. This will work if either the buffer already allocated for
* the SV [scalar value] is large enough to hold the data or the API provides
* an easy way to determine the required size [and the XS code uses it].
*
* section [grow_*()], the INIT: section [init_*()], or the OUTPUT: section
* [trunc_*()].
*
- * Buffer arguments should be initialied with C<= NO_INIT> [or C<= NULL;>].
+ * Buffer arguments should be initialised with C<= NO_INIT> [or C<= NULL;>].
*
* See also the F<typemap> file. C<oDWORD>, for example, is for an output-
* only parameter of type C<DWORD> and you should simply C<#define> it to be
* determine the size of data written based on the size of the scalar we
* output anyway.
*
- * This second difference doesn't apply unless the paremter is listed in
+ * This second difference doesn't apply unless the parameter is listed in
* the OUTPUT: section without specific output instructions. We define
- * no macros for outputing buffer length parameters so be careful to use
+ * no macros for outputting buffer length parameters so be careful to use
* C<oDWORD> [for example] for them if and only if they are output-only.
*
* Note that C<oDWORD> is the same as C<DWORD> in that, if a defined value
SvCUR_set( svBuf, lSize ); \
} } STMT_END
-/* Same as above except we have a poitner to the returned length: */
+/* Same as above except we have a pointer to the returned length: */
#define trunc_buf_pl( bOkay, sBuf,svBuf, plSize ) \
trunc_buf_l( bOkay, sBuf,svBuf, *plSize )
SvCUR_set( svBuf, (lwSize)*sizeof(WCHAR) ); \
} } STMT_END
-/* Same as above except we have a poitner to the returned length: */
+/* Same as above except we have a pointer to the returned length: */
#define trunc_buf_plw( bOkay, swBuf,svBuf, plwSize ) \
trunc_buf_lw( bOkay, swBuf,svBuf, *plwSize )
unlink "foo.txt";
-my $fh = new Win32API::File "+> foo.txt"
+my $fh = Win32API::File->new("+> foo.txt")
or die fileLastError();
my $tell = tell $fh;
# Test out binmode (should be only LF with print, no CR).
-$fh = new Win32API::File "+> foo.txt"
+$fh = Win32API::File->new("+> foo.txt")
or die fileLastError();
binmode $fh;
print $fh "hello there\n";
Applied [perl #93470] silencing compiler warnings with -Wwrite-strings
+=item *
+
+L<Win32API::File> has been upgraded from version 0.1101 to version 0.1200
+
+Added SetStdHandle and GetStdHandle functions
+
=back
=head2 Removed Modules and Pragmata