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 occurred.
NN_BOSS_NSDATA_READ_ERROR_UPDATED The target NS data version was updated since the last time data was obtained.

Description

Reads an NS data file. The interface is similar to that of file access. 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. An application can only load one NS data file at once, but even if it loads a large NSD, other applications are not blocked from loading NS data as long as the other applications do not try to access the same NS data.
Note: An error will be returned if the target NS data cannot be found, whether it is because another application has already deleted the NS data, there was not enough space available when downloading the NS archive, or the data was automatically deleted. The function returns NN_BOSS_NSDATA_READ_ERROR_UPDATED in those rare instances where the specified NS data version has been updated since the last time the data was obtained. In such cases, call Initialize and then read the data again.

Revision History

2010/09/16
Initial version.

CONFIDENTIAL