nn::boss::NsData::ReadData Member Function

Syntax

s32 ReadData(
u8 * pDataBuf,
size_t bufLen
);

Arguments

Name Description
out pDataBuf Specifies the NS data buffer.
in bufLen Specifies the NS data buffer length.

Return Values

Returns the size in bytes of the read data. Returns 0 if it reached the end of the data.
Value Description
NN_BOSS_NSDATA_READ_ERROR_GET_HEADER Failed to get NS data header.
NN_BOSS_NSDATA_READ_ERROR_READ_DATA Failed to load NS data.
NN_BOSS_NSDATA_READ_ERROR_IPC Internal error has occurred.

Description

Reads an NS data file. The interface resembles the file access interface. After allocating an adequately sized buffer, call this function multiple times to read an entire NS data file. Returns 0 upon reaching end of file, indicating that the read is finished. The application only reads one set of NS data at any one time, but even when a large NSD is being read, other applications are not blocked from reading NS data, provided the same set of NS data is not being accessed. Note that an error will be returned if the target NS data cannot be found, be it because another application has already deleted the NS data, there was not enough space available when downloading the NSA, or because the data have been automatically deleted.

Revision History

2010/09/16
Initial version.

CONFIDENTIAL