RtvdbDeleteDirectory
RtvdbDeleteDirectory deletes a directory.
Syntax
DWORD RtvdbDeleteDirectory(
[in] RTVDB_DIRECTORY Directory,
[in] BOOL ForceClose,
[in] BOOL ForceDelete,
[in] ULONG Timeout
);
Parameters
[in] Directory
A handle for the directory to delete. To retrieve the corresponding handle, use RtvdbOpenDirectory or RtvdbCreateDirectory.
[in] ForceClose
TRUE to automatically close any opened handles, FALSE to fail the function. See Remarks for more details.
[in] ForceDelete
TRUE to mark the directory as deleted even if handles are still opened in other applications, FALSE to fail the function. See Remarks for more details.
[in] Timeout
The timeout duration, in milliseconds, to wait for other applications to close all handles.
Return Values
| Error code | Meaning |
|---|---|
|
ERROR_SUCCESS |
The function succeeded. |
|
ERROR_INVALID_PARAMETER |
One of the following conditions occurred:
|
|
ERROR_INVALID_HANDLE |
Parameter Directory does not point to a directory or points to a closed directory. |
|
ERROR_OPERATION_ABORTED |
One of the following conditions occurred:
|
|
ERROR_ABANDONED_WAIT_0 |
One of the following conditions occurred:
|
|
ERROR_ABANDONED_WAIT_63 |
One of the following conditions occurred:
|
|
ERROR_NOT_READY |
The calling process has not called RtvdbInitialize. |
Remarks
If any handles remain open within the application and ForceClose is set to FALSE, the call will fail, and the directory will remain open.
If handles are open in other applications, calling RtvdbDeleteDirectory will mark the directory invalid and wait for the handles to be released.
If the wait fails and ForceDelete is set to FALSE, calling RtvdbDeleteDirectory will fail, and the directory will be closed but not deleted.
If the wait fails and ForceDelete is set to TRUE, calling RtvdbDeleteDirectory will mark the directory as deleted even if handles are still opened in other applications. It could cause unexpected behaviors if a new directory is created before all handles are closed.
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
RtvdbApi.h |
RtvdbApi_W64.lib (Windows), RtvdbApi.lib (RTSS) |
See Also: