RtvdbOpenDirectory

RtvdbOpenDirectory opens a sub-directory.

Syntax

Copy
DWORD RtvdbOpenDirectory(
  [in]    RTVDB_DIRECTORY Parent,
  [out]   RTVDB_DIRECTORY* pDirectory,
  [in]    const wchar_t* pName,
  [out]   ULONG* pSize
);

Parameters

[in] Parent

The handle of a parent directory. To retrieve the corresponding handle, use RtvdbOpenDirectory, RtvdbOpenDatabase, RtvdbCreateDirectory, or RtvdbCreateDatabase.

[out] pDirectory

A pointer to store the opened directory handle.

[in] pName

The directory name to open. The maximum name length is 63 characters, as defined by RTVDB_MAX_NAME_LENGTH in the header file.

[out] pSize

A pointer to store the maximum number of variables in the directory.

Return Values

Error code Meaning

ERROR_SUCCESS

The function succeeded.

ERROR_NOT_READY

One of the following conditions occurred:

  • The calling process has not called RtvdbInitialize.
  • The database is currently invalidated.

ERROR_INVALID_PARAMETER

One of the following conditions occurred:

  • Parameter Parent, pDirectory, pName, or pSize is NULL.
  • The value of parameter pName is either empty or exceeds 63 characters in length.

ERROR_INVALID_HANDLE

Parameter Parent does not point to a directory or points to a closed directory.

ERROR_NOT_FOUND

There is no directory with this name in the parent directory.

ERROR_ABANDONED_WAIT_0

Failed to acquire the synchronization lock.

ERROR_NOT_ENOUGH_MEMORY

Failed to allocate memory.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

RtvdbApi.h

RtvdbApi_W64.lib (Windows), RtvdbApi.lib (RTSS)

See Also: