RtvdbCreateVariable
RtvdbCreateVariable creates and opens a variable.
Syntax
DWORD RtvdbCreateVariable(
[in] RTVDB_DIRECTORY Parent,
[out] RTVDB_VARIABLE_CONTROL* pVariable,
[in] RTVDB_VARIABLE_DESCRIPTION Description
);
Parameters
[in] Parent
A handle of the parent directory. To retrieve the corresponding handle, use RtvdbOpenDirectory, RtvdbOpenDatabase, RtvdbCreateDirectory, or RtvdbCreateDatabase.
[out] pVariable
A pointer to store the created variable handle and value pointer. See RTVDB_VARIABLE_CONTROL.
[in] Description
The name and type of the variable to create. See RTVDB_VARIABLE_DESCRIPTION.
Return Values
| Error code | Meaning |
|---|---|
|
ERROR_SUCCESS |
The function succeeded. |
|
ERROR_NOT_READY |
One of the following conditions occurred:
|
|
ERROR_INVALID_PARAMETER |
One of the following conditions occurred:
|
|
ERROR_UNSUPPORTED_TYPE |
One of the following conditions occurred:
|
|
ERROR_INVALID_HANDLE |
Parameter Parent does not point to a directory or points to a closed directory. |
|
ERROR_ALREADY_EXISTS |
A variable with this name already exists in the parent directory. |
|
ERROR_ABANDONED_WAIT_0 |
Failed to acquire the synchronization lock. |
|
ERROR_NOT_ENOUGH_MEMORY |
Failed to allocate memory. |
Remarks
This function cannot create buffer variables. Use RtvdbCreateBufferVariable instead.
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
RtvdbApi.h |
RtvdbApi_W64.lib (Windows), RtvdbApi.lib (RTSS) |
See Also: