Function Reference


Reopens the specified file system object with different access rights, sharing mode, and flags

#include <WinAPIFiles.au3>
_WinAPI_ReOpenFile ( $hFile, $iAccess, $iShare [, $iFlags = 0] )


$hFile Handle to the object to be reopened. The object must have been created by the _WinAPI_CreateFileEx() function.
$iAccess The required access to the object. If this parameter is 0, the application can query device attributes
without accessing the device.
(See MSDN for more information)
$iShare The sharing mode of the object. If this parameter is 0, the object cannot be shared and cannot be
opened again until the handle is closed.
$iFlags [optional] The file or device attributes and flags. This parameter can be one or more of the following values.


Return Value

Success: Handle to the specified file.
Failure: 0, call _WinAPI_GetLastError() to get extended error information.


The $iFlags parameter cannot contain any of the file attribute flags ($FILE_ATTRIBUTE_*). These can only be
specified when the file is created.

This function requires Windows Vista or later.



See Also

Search ReOpenFile in MSDN Library.