Stands for ``Query access''. This is really a no-op since you always have
query access when you open a file. You can specify <A HREF="#item_%22q%22"><CODE>"q"</CODE></A> to document
that you plan to query the file [or device, etc.]. This is especially
helpful when you don't want read nor write access since something like
<A HREF="#item_%22q%22"><CODE>"q"</CODE></A> or <CODE>"q ke"</CODE> may be easier to understand than just <CODE>""</CODE> or <A HREF="#item_%22ke%22"><CODE>"ke"</CODE></A>.
<P></P>
<DT><STRONG><CODE>"r"</CODE></STRONG><BR>
<DD>
Stands for ``Read access''. Sets the <CODE>GENERIC_READ</CODE> <CODE>bit(s)</CODE> in the
<CODE>$uAccess</CODE> that is passed to <A HREF="#item_CreateFile"><CODE>CreateFile</CODE></A>. This is the default
access if the <CODE>$svAccess</CODE> parameter is missing or is <A HREF="../../../lib/Pod/perlfunc.html#item_undef"><CODE>undef</CODE></A> and
Stands for ``Existing file only''. If the requested file does not exist, then
nothing is opened and the <A HREF="#item_createFile"><CODE>createFile</CODE></A> call fails. This is the default
unless <CODE>GENERIC_WRITE</CODE> access has been requested or <A HREF="#item_%22t%22"><CODE>"t"</CODE></A> or <A HREF="#item_%22n%22"><CODE>"n"</CODE></A> was
specified. Contrast with <A HREF="#item_%22c%22"><CODE>"c"</CODE></A>. Can't be used with <A HREF="#item_%22n%22"><CODE>"n"</CODE></A>.
<P></P></DL>
<P>The characters from <CODE>"ktn"</CODE> and <CODE>"ce"</CODE> are combined to determine the
what value for <CODE>$uCreate</CODE> to pass to <A HREF="#item_CreateFile"><CODE>CreateFile</CODE></A> [unless overridden
Deletes the named file. Compared to Perl's <A HREF="../../../lib/Pod/perlfunc.html#item_unlink"><CODE>unlink</CODE></A>, <A HREF="#item_DeleteFile"><CODE>DeleteFile</CODE></A>
has the advantage of not deleting read-only files. For &some;
versions of Perl, <A HREF="../../../lib/Pod/perlfunc.html#item_unlink"><CODE>unlink</CODE></A> silently calls <A HREF="../../../lib/Pod/perlfunc.html#item_chmod"><CODE>chmod</CODE></A> whether it needs
to or not before deleting the file so that files that you have
protected by marking them as read-only are not always protected from
Preliminary verifications are made and then an entry is added to the
Registry to cause the rename [or delete] operation to be done the
next time this copy of the operating system is booted [right after
any automatic file system checks have completed]. This is not
supported under Windows 95.
<P>When this bit is set, <CODE>$sNewName</CODE> can be <CODE>[]</CODE> [for <CODE>NULL</CODE>] to
indicate that <CODE>$sOldName</CODE> should be deleted during the next boot
rather than renamed.</P>
<P>Setting both the <A HREF="#item_MOVEFILE_COPY_ALLOWED"><CODE>MOVEFILE_COPY_ALLOWED</CODE></A> and
<A HREF="#item_MOVEFILE_DELAY_UNTIL_REBOOT"><CODE>MOVEFILE_DELAY_UNTIL_REBOOT</CODE></A> bits will cause <A HREF="#item_MoveFileEx"><CODE>MoveFileEx</CODE></A> to fail.</P>
[<A HREF="#item_%22t%22"><CODE>"t"</CODE></A>], and <CODE>O_BINARY</CODE> [<CODE>"b"</CODE>] flags [see the <A HREF="../../../lib/Fcntl.html">the Fcntl manpage</A> module]
that is passed to <A HREF="#item_OsFHandleOpenFd"><CODE>OsFHandleOpenFd</CODE></A>. Currently only <CODE>O_APPEND</CODE>
and <CODE>O_TEXT</CODE> have any significance.</P>
<P>Also, a <A HREF="#item_%22r%22"><CODE>"r"</CODE></A> and/or <A HREF="#item_%22w%22"><CODE>"w"</CODE></A> in <CODE>$sMode</CODE> is used to decide how the
file descriptor is converted into a Perl file handle, even though this
doesn't appear to make a difference. One of the following is used:</P>
<PRE>
open( FILE, "<&=".$ivFd )
open( FILE, ">&=".$ivFd )
open( FILE, "+<&=".$ivFd )</PRE>
<P><A HREF="#item_OsFHandleOpen"><CODE>OsFHandleOpen</CODE></A> eventually calls the Win32-specific C routine
<CODE>_open_osfhandle()</CODE> or Perl's ``improved'' version called
<CODE>win32_open_osfhandle()</CODE>. Prior to Perl5.005, C's
<CODE>_open_osfhandle()</CODE> is called which will fail if
<A HREF="#item_GetFileType"><CODE>GetFileType($hNativeHandle)</CODE></A> would return <A HREF="#item_FILE_TYPE_UNKNOWN"><CODE>FILE_TYPE_UNKNOWN</CODE></A>.
For Perl5.005 and later, <A HREF="#item_OsFHandleOpen"><CODE>OsFHandleOpen</CODE></A> calls
<CODE>win32_open_osfhandle()</CODE> from the Perl DLL which doesn't have
If set, indicates that when a critical error is encountered, the call
that triggered the error fails immediately. Normally this bit is not
set, which means that a critical error causes a dialogue box to appear
notifying the desktop user that some application has triggered a
critical error. The dialogue box allows the desktop user to decide
whether the critical error is returned to the process, is ignored, or
the offending operation is retried.
<P>This affects the <A HREF="#item_CreateFile"><CODE>CreateFile</CODE></A> and <A HREF="#item_GetVolumeInformation"><CODE>GetVolumeInformation</CODE></A> calls.</P>
The native Win32 version of <A HREF="../../../lib/Pod/perlfunc.html#item_seek"><CODE>seek()</CODE></A>. <A HREF="#item_SetFilePointer"><CODE>SetFilePointer</CODE></A> sets the
position within a file where the next read or write operation will
start from.
<P><CODE>$hFile</CODE> is a Win32 native file handle.</P>
<P><CODE>$uFromWhere</CODE> is either <CODE>FILE_BEGIN</CODE>, <CODE>FILE_CURRENT</CODE>, or
<CODE>FILE_END</CODE>, indicating that the new file position is being specified
relative to the beginning of the file, the current file pointer, or
the end of the file, respectively.</P>
<P><CODE>$ivOffset</CODE> is [if <CODE>$ioivOffsetHigh</CODE> is <CODE>[]</CODE>] the offset [in bytes]
to the new file position from the position specified via
<CODE>$uFromWhere</CODE>. If <CODE>$ioivOffsetHigh</CODE> is not <CODE>[]</CODE>, then <CODE>$ivOffset</CODE>
is treated is converted to an unsigned value to be used as the
low-order 4 bytes of the offset.</P>
<P><CODE>$ioivOffsetHigh</CODE> can be <CODE>[]</CODE> [for <CODE>NULL</CODE>] to indicate that you are
only specifying a 4-byte offset and the resulting file position will
be 0xFFFFFFFE or less [just under 4GB]. Otherwise <CODE>$ioivOfffsetHigh</CODE>
starts out with the high-order 4 bytes [signed] of the offset and gets
set to the [unsigned] high-order 4 bytes of the resulting file position.</P>
<P>The underlying <A HREF="#item_SetFilePointer"><CODE>SetFilePointer</CODE></A> returns <CODE>0xFFFFFFFF</CODE> to indicate
failure, but if <CODE>$ioivOffsetHigh</CODE> is not <CODE>[]</CODE>, you would also have
to check <CODE>$^E</CODE> to determine whether <CODE>0xFFFFFFFF</CODE> indicates an error
or not. <CODE>Win32API::File::SetFilePointer</CODE> does this checking for you
and returns a false value if and only if the underlying
<A HREF="#item_SetFilePointer"><CODE>SetFilePointer</CODE></A> failed. For this reason, <CODE>$uNewPos</CODE> is set to <CODE>"0
but true"</CODE> if you set the file pointer to the beginning of the file
[or any position with 0 for the low-order 4 bytes].</P>
<P><CODE>$hFile</CODE> is a Win32 native file handle open to the file or device to
write to.</P>
<P><CODE>$pBuffer</CODE> is a string containing the bytes to be written.</P>
<P><CODE>$lBytes</CODE> is the number of bytes you would like to write. If
<CODE>$pBuffer</CODE> is not at least <CODE>$lBytes</CODE> long, <A HREF="#item_WriteFile"><CODE>WriteFile</CODE></A> croaks. You
can specify <CODE>0</CODE> for <CODE>$lBytes</CODE> to write <A HREF="../../../lib/Pod/perlfunc.html#item_length"><CODE>length($pBuffer)</CODE></A> bytes.
A leading <CODE>"="</CODE> on <CODE>$lBytes</CODE> will be silently ignored, even if Perl
warnings are enabled.</P>
<P><CODE>$ouBytesWritten</CODE> will be set to the actual number of bytes written
unless you specify it as <CODE>[]</CODE>.</P>
<P><CODE>$pOverlapped</CODE> is <CODE>[]</CODE> or is a <CODE>OVERLAPPED</CODE> structure packed
into a string. This is only useful if <CODE>$hFile</CODE> was opened with
the <CODE>FILE_FLAG_OVERLAPPED</CODE> flag set.</P>
Miscellaneous constants. Used for the <CODE>$uCreate</CODE> argument of
<A HREF="#item_CreateFile"><CODE>CreateFile</CODE></A> or the <CODE>$uFromWhere</CODE> argument of <A HREF="#item_SetFilePointer"><CODE>SetFilePointer</CODE></A>.
Plus <CODE>INVALID_HANDLE_VALUE</CODE>, which you usually won't need to check
for since <A HREF="#item_CreateFile"><CODE>CreateFile</CODE></A> translates it into a false value.
<A HREF="#item_IOCTL_DISK_REQUEST_STRUCTURE"><CODE>IOCTL_DISK_REQUEST_STRUCTURE</CODE></A>, and <A HREF="#item_IOCTL_DISK_REQUEST_DATA"><CODE>IOCTL_DISK_REQUEST_DATA</CODE></A>.</P>
<DT><STRONG><A NAME="item_%24uStartOffsetLow_and_%24ivStartOffsetHigh"><CODE>$uStartOffsetLow</CODE> and <CODE>$ivStartOffsetHigh</CODE></A></STRONG><BR>
<DD>
The low-order and high-order [respectively] 4 bytes of the offset [in