NjxGetAdditionalInfo Function

Description

This function is used to get a candidate's additional information string from the processing result structure.
If the return value indicates an error, undefined values may be stored in the buffer for storing additional information strings (buf).

Syntax

#include <mw/iwnn/iwnnCTR.h>

s32 NjxGetAdditionalInfo (
     wchar_t* buf,                                // Buffer for getting the additional information string
     const IWNN_CLASS* iwnn,                      // Parsing information class
     const IWNN_RESULT* result,                   // Processing result structure
     s8 index,                                    // The location of obtained additional information
     u32 size                                     // Buffer byte size
);

Arguments

NameDescription
OUT wchar_t* buf Buffer for storing additional information strings.
Allocates a buffer and specifies a pointer. Be sure to allocate a wchar_t array region having the size given by
NJ_MAX_ADDITIONAL_LEN + NJ_TERM_SIZE in the case of processing results where learnable additional data has been set.
Contact Nintendo for the number of arrays required in the case of processing results where unlearnable additional information has been set.
Up to 65536 bytes are required. (For whether additional information is learnable, see Section 8.2, Dictionary Sets (IWNN_DIC_SET, IWNN_DIC_INFO, and IWNN_FLASH_DIC_INFO).
An error results if NULL is specified.
IN const IWNN_CLASS* iwnn Parsing information class
An error results if NULL is specified.
IN const IWNN_RESULT* result The processing result structure.
An error results if NULL is specified.
IN s8 index The index number of additional information to be obtained.
Specifies the index number of additional information to be obtained.
Specify a value from 0 up to the maximum number identifying the additional information that can be mounted (NJ_MAX_ADDITIONAL_INFO).
IN u32 size Byte size of the buffer for storing additional information strings.
Specify a size that includes a string terminator.
Specify the size as a number of bytes.

Return Value

s32 Length of the obtained string. (Terminator not included)
A negative value indicates an error.

Error Code Description of Error
NJ_ERR_PARAM_ENVIRONMENT_NULL A NULL pointer was specified for iwnn
NJ_ERR_PARAM_RESULT_NULL A NULL pointer was specified for result
NJ_ERR_PARAM_INDEX_INVALID More than the maximum number of additional information that can be mounted (NJ_MAX_ADDITIONAL_INFO) was specified in index
NJ_ERR_BUFFER_NOT_ENOUGH   ■ A NULL pointer was specified in buf
  ■ 0 was specified in size
  ■ The additional information string length of result is larger than size
NJ_ERR_INVALID_RESULT   ■ An unsupported code was set for operations on result [OS1]

CONFIDENTIAL