Win32 - Interfaces to some Win32 API Functions |
Win32 - Interfaces to some Win32 API Functions
Perl on Win32 contains several functions to access Win32 APIs. Some are included in Perl itself (on Win32) and some are only available after explicitly requesting the Win32 module with:
use Win32;
The builtin functions are marked as [CORE] and the other ones
as [EXT] in the following alphabetical listing. The Win32
module
is not part of the Perl source distribution; it is distributed in
the libwin32 bundle of Win32::* modules on CPAN. The module is
already preinstalled in binary distributions like ActivePerl.
unlink()
it first
yourself.
%VariableName%
. Case is ignored when looking up the
VariableName in the environment. If the variable is not found then the
original %VariableName%
text is retained. Has the same effect
as the following:
$string =~ s/%([^%]*)%/$ENV{$1} || "%$1%"/eg
perror()
standard-C library function. Note that $^E
used
in a string context has much the same effect.
C:\> perl -e "$^E = 26; print $^E;" The specified disk or diskette cannot be accessed
0x00000001 supports case-sensitive filenames 0x00000002 preserves the case of filenames 0x00000004 supports Unicode in filenames 0x00000008 preserves and enforces ACLs 0x00000010 supports file-based compression 0x00000020 supports disk quotas 0x00000040 supports sparse files 0x00000080 supports reparse points 0x00000100 supports remote storage 0x00008000 is a compressed volume (e.g. DoubleSpace) 0x00010000 supports object identifiers 0x00020000 supports the Encrypted File System (EFS)
MAXCOMPLEN is the maximum length of a filename component (the part between two backslashes) on this file system.
This function has been added for Perl 5.6.
$^E
used in a numeric context amounts to the
same value.
This function has been added for Perl 5.6.
0 = OK 1 = OK and Cancel 2 = Abort, Retry, and Ignore 3 = Yes, No and Cancel 4 = Yes and No 5 = Retry and Cancel
MB_ICONSTOP "X" in a red circle MB_ICONQUESTION question mark in a bubble MB_ICONEXCLAMATION exclamation mark in a yellow triangle MB_ICONINFORMATION "i" in a bubble
TITLE specifies an optional window title. The default is ``Perl''.
The function returns the menu id of the selected push button:
0 Error
1 OK 2 Cancel 3 Abort 4 Retry 5 Ignore 6 Yes 7 No
Win32 - Interfaces to some Win32 API Functions |