libctru  v2.4.1
loader.h
Go to the documentation of this file.
1 /**
2  * @file loader.h
3  * @brief LOADER Service
4  */
5 
6 #pragma once
7 
8 #include <3ds/exheader.h>
9 #include <3ds/services/fs.h>
10 
11 /// Initializes LOADER.
13 
14 /// Exits LOADER.
15 void loaderExit(void);
16 
17 /**
18  * @brief Loads a program and returns a process handle to the newly created process.
19  * @param[out] process Pointer to output the process handle to.
20  * @param programHandle The handle of the program to load.
21  */
22 Result LOADER_LoadProcess(Handle* process, u64 programHandle);
23 
24 /**
25  * @brief Registers a program (along with its update).
26  * @param[out] programHandle Pointer to output the program handle to.
27  * @param programInfo The program info.
28  * @param programInfo The program update info.
29  */
30 Result LOADER_RegisterProgram(u64* programHandle, const FS_ProgramInfo *programInfo, const FS_ProgramInfo *programInfoUpdate);
31 
32 /**
33  * @brief Unregisters a program (along with its update).
34  * @param programHandle The handle of the program to unregister.
35  */
37 
38 /**
39  * @brief Retrives a program's main NCCH extended header info (SCI + ACI, see @ref ExHeader_Info).
40  * @param[out] exheaderInfo Pointer to output the main NCCH extended header info.
41  * @param programHandle The handle of the program to unregister
42  */
43 Result LOADER_GetProgramInfo(ExHeader_Info* exheaderInfo, u64 programHandle);
NCCH extended header definitions.
Filesystem Services.
Result LOADER_LoadProcess(Handle *process, u64 programHandle)
Loads a program and returns a process handle to the newly created process.
Result LOADER_GetProgramInfo(ExHeader_Info *exheaderInfo, u64 programHandle)
Retrives a program's main NCCH extended header info (SCI + ACI, see ExHeader_Info).
void loaderExit(void)
Exits LOADER.
Result LOADER_RegisterProgram(u64 *programHandle, const FS_ProgramInfo *programInfo, const FS_ProgramInfo *programInfoUpdate)
Registers a program (along with its update).
Result loaderInit(void)
Initializes LOADER.
Result LOADER_UnregisterProgram(u64 programHandle)
Unregisters a program (along with its update).
Main extended header data, as returned by PXIPM, Loader and FSREG service commands.
Definition: exheader.h:181
Program information.
Definition: fs.h:183
uint64_t u64
64-bit unsigned integer
Definition: types.h:24
u32 Handle
Resource handle.
Definition: types.h:41
s32 Result
Function result.
Definition: types.h:42