RtfwecatGetAllInstances

RtfwecatGetAllInstances gets the configuration of all E-CAT MainDevice instances. If the function returns ERROR_INSUFFICIENT_BUFFER, the instance configuration data is invalid, but pInstanceCount still contains the total number of instances.

Syntax

Copy
bool RtfwecatGetAllInstances(
    [in]    unsigned int BufferLength,
    [out]   unsigned int* pInstanceCount,
    [out]   RTFWECAT_INSTANCE_CONFIGURATION* pConfiguration
);

Parameters

[in] BufferLength

The size of the configuration data buffer.

[out] pInstanceCount

A pointer for the number of instances to be written.

[out] pConfiguration

A pointer to the buffer that will receive the configurations of instances.

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

ERROR_INVALID_PARAMETER

One of the following conditions occurred:

  • Parameter pInstanceCount is NULL.
  • Parameter BufferLength is not 0 and pConfiguration is NULL.

ERROR_INSUFFICIENT_BUFFER

Parameter pInstanceCount is larger than BufferLength.

ERROR_NOT_FOUND

The registry key that lists the instances does not exist.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

RtfwecatApi.h

RtfwecatApi.lib

See Also: