Closes and reopens an existing file object with new access and share mode.
RTHANDLE ReOpenRtFile(
RTHANDLE hOriginalFile,
DWORD dwAccessMode,
DWORD dwShareMode,
DWORD dwFlags);
hOriginalFile 
dwAccessMode 
dwShareMode 
dwFlags 
Returns a RTHANDLE value for the reopened file on success. Returns BAD_RTHANDLE on failure and the file handle, if originally valid, will be in the closed state. Call GetLastRtError to get extended status information.
| Status value | Meaning | 
|---|---|
| E_EXIST | The handle provided is not a valid handle | 
| E_TYPE | The handle provided is not a handle for a file | 
| E_IO_HARD | An I/O error occurred during the operation | 
| E_CONN_NOT_OPEN | The handle provided does not refer to an open file | 
| E_FACCESS | The dwAccessMode parameter value conflicts with the share mode in the original CreateRtFile call, or the dwShareMode parameter value conflicts with the access mode in the original CreateRtFile call. | 
| E_PARAM | The dwAccessMode or dwShareMode parameter is invalid | 
| E_SHARE | The file’s share state is not compatible with the dwShareMode provided in the call | 
| Versions | Defined in | Include | Link to | 
|---|---|---|---|
| INtime 6.0 | intime/rt/include/rtbase.h | rt.h | rt.lib |