RtkGetLicenses

RtkGetLicenses retrieves information about all licenses installed on the system. It can only be used by RTK drivers; it cannot be used in Windows or RTSS applications.

Syntax

Copy
NTSTATUS RtkGetLicenses(
    [out]        PRT_LICENSE_INFO result,
    [in, out]    PULONG length
);

Parameters

[out] result

A pointer to an array of RT_LICENSE_INFO structures that will be filled in. Note that the caller must allocate enough array entries for the result parameter, or the call will return STATUS_BUFFER_TOO_SMALL.

[in, out] length

A pointer to the number of license info array entries provided in the result parameter. When there is insufficient space in the array to hold all the entries, this value will be updated with the number of array elements required to hold all the license information. This value is updated with the number of license entries written into the array when there is enough space.

Return Value

If the function succeeds, it returns STATUS_SUCCESS. If the function fails, it returns a different error code.

Possible error codes:

Error code Description

STATUS_SUCCESS

The call has succeeded.

STATUS_INTERNAL_ERROR

The call failed with an internal system error.

STATUS_INVALID_PARAMETER

An invalid length parameter was passed, or one of the required pointer parameters was NULL.

STATUS_BUFFER_TOO_SMALL

The passed buffer length is too small.

STATUS_DRIVER_INTERNAL_ERROR

The call failed with an internal driver error.

Remarks

If the dongleSerialNumber string in any returned RT_LICENSE_INFO structure is empty, the corresponding product feature (e.g., WSDK64, WNET64, etc.) is licensed to the system, not to a dongle.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

RtkApi.h

RtkApi_W64.lib