RtfwSetSearchPath

RtfwSetSearchPath sets the ordered list of directories to be searched by the wRTOS Subsystem when loading an RTDLL or launching an RTSS application which was provided without specifying an absolute pathname to the RTDLL or RTSS file.

Syntax

Copy
bool RtfwSetSearchPath(
    [in]    const TCHAR * pSearchPath
);

Parameters

[in] pSearchPath

A pointer to a string containing a semi-colon-separated list of absolute pathnames of directories to be searched. These directories do not have to exist. The maximum length of each absolute pathname is MAX_PATH – 9 characters.

Return Value

If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code.

Possible error codes:

Error code Meaning

RT_ERROR_DUPLICATE_SEARCH_PATH

Duplicate search paths were specified.

RT_ERROR_SEARCHPATH_TOO_LONG

The pSearchPath value contained within the list of paths is too long.

Remarks

If parameter pSearchPath points to an empty string, the search path is disabled.

Duplicate search paths are not supported.

Any pathname passed to this function must not refer to a network location. This includes:

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

RtfwApi.h

RtfwApi.lib

See Also: