#include <revolution/cnt.h>
s32 CNTInitHandleTitle(u64 titleId, u32 contentIdx, CNTHandle* CntHandle, MEMAllocator* allocator);
titleId |
Title ID of the data title you want to open. The upper 32 bits are fixed to 0x00010005. The lower 32 bits are the game code (4 bytes of ASCII). |
contentIdx |
The number of the content file you want to open. |
CntHandle |
Pointer to the CNTHandle structure to be initialized. |
allocator |
Pointer to the memory allocator for storing FST. The allocator must be 32-byte aligned.Memory is deallocated when CNTReleaseHandle is called. |
For a NAND application, returns one of the following codes:
CNT_RESULT_OK
CNT_RESULT_ACCESS
CNT_RESULT_ALLOC_FAILED
CNT_RESULT_AUTHENTICATION
CNT_RESULT_CORRUPT
CNT_RESULT_ECC_CRIT
CNT_RESULT_INVALID
CNT_RESULT_MAXFD
CNT_RESULT_OUT_OF_MEMORY
CNT_RESULT_UNKNOWN
CNT_RESULT_FATAL
Returns CNT_RESULT_INVALID if the /datatitle/{game code}/content{index} directory does not exist under DvdRoot during access using disc emulation.
Opens the data title's content files stored in Wii NAND memory and initializes the CNTHandle structure. Data titles do not possess programs, so the content files are numbered starting from 1.
See CNTInitHandle for other precautionary notes.
Note:This function is for data titles. To develop data titles and the applications that use them you need to have ECDK, which is provided separately.
CNT_RESULT_OK, CNT_RESULT_INVALID, and CNT_RESULT_ACCESS are returned byCNTInitHandleTitle as listed below for the purchase status of data titles according to ECDK.
| Data title status | Target content file | Return values |
| Not purchased | All content files | CNT_RESULT_INVALID |
| Purchased only | Purchased content file | CNT_RESULT_INVALID |
| Unpurchased content file | CNT_RESULT_ACCESS |
|
| After purchased content file has been downloaded | Purchased content file | CNT_RESULT_OK |
| Unpurchased content file | CNT_RESULT_ACCESS |
|
| After deletion on the data-management screen of the Wii Menu | Purchased content file | CNT_RESULT_INVALID |
| Unpurchased content file | CNT_RESULT_ACCESS |
CNTInitHandle,
CNTReleaseHandle
2008/04/30 Added support for accesses performed by disc emulation for data titles.
2008/03/14 Added a list of return values representing ECDK purchase status.
2008/02/15 Added a note concerning the need for ECDK. Added a description of the Title ID.
2008/02/13 Standardized the use of the term "content file".
2007/10/11 Initial version.
CONFIDENTIAL