libnx
v4.8.0
|
Homebrew environment definitions and utilities. More...
Go to the source code of this file.
Data Structures | |
struct | ConfigEntry |
Structure representing an entry in the homebrew environment configuration. More... | |
Typedefs | |
typedef void(* | LoaderReturnFn) (int result_code) |
Loader return function. | |
Enumerations | |
enum | { EntryFlag_IsMandatory = (1U<<( 0 )) } |
Entry flags. More... | |
enum | { EntryType_EndOfList =0 , EntryType_MainThreadHandle =1 , EntryType_NextLoadPath =2 , EntryType_OverrideHeap =3 , EntryType_OverrideService =4 , EntryType_Argv =5 , EntryType_SyscallAvailableHint =6 , EntryType_AppletType =7 , EntryType_AppletWorkaround =8 , EntryType_Reserved9 =9 , EntryType_ProcessHandle =10 , EntryType_LastLoadResult =11 , EntryType_RandomSeed =14 , EntryType_UserIdStorage =15 , EntryType_HosVersion =16 , EntryType_SyscallAvailableHint2 =17 } |
enum | { EnvAppletFlags_ApplicationOverride = (1U<<( 0 )) } |
Functions | |
void | envSetup (void *ctx, Handle main_thread, LoaderReturnFn saved_lr) |
Parses the homebrew loader environment block (internally called). More... | |
const char * | envGetLoaderInfo (void) |
Returns information text about the loader, if present. | |
u64 | envGetLoaderInfoSize (void) |
Returns the size of the loader information text. | |
Handle | envGetMainThreadHandle (void) |
Retrieves the handle to the main thread. | |
bool | envIsNso (void) |
Returns true if the application is running as NSO, otherwise NRO. | |
bool | envHasHeapOverride (void) |
Returns true if the environment has a heap override. | |
void * | envGetHeapOverrideAddr (void) |
Returns the address of the overriden heap. | |
u64 | envGetHeapOverrideSize (void) |
Returns the size of the overriden heap. | |
bool | envHasArgv (void) |
Returns true if the environment has an argv array. | |
void * | envGetArgv (void) |
Returns the pointer to the argv array. | |
bool | envIsSyscallHinted (unsigned svc) |
Returns whether a syscall is hinted to be available. More... | |
Handle | envGetOwnProcessHandle (void) |
Returns the handle to the running homebrew process. | |
LoaderReturnFn | envGetExitFuncPtr (void) |
Returns the loader's return function, to be called on program exit. | |
void | envSetExitFuncPtr (LoaderReturnFn addr) |
Sets the return function to be called on program exit. | |
Result | envSetNextLoad (const char *path, const char *argv) |
Configures the next homebrew application to load. More... | |
bool | envHasNextLoad (void) |
Returns true if the environment supports envSetNextLoad. | |
Result | envGetLastLoadResult (void) |
Returns the Result from the last NRO. | |
bool | envHasRandomSeed (void) |
Returns true if the environment provides a random seed. | |
void | envGetRandomSeed (u64 out[2]) |
Retrieves the random seed provided by the environment. More... | |
AccountUid * | envGetUserIdStorage (void) |
Returns a pointer to the user id storage area (if present). | |
Homebrew environment definitions and utilities.
anonymous enum |
anonymous enum |
anonymous enum |
void envGetRandomSeed | ( | u64 | out[2] | ) |
Retrieves the random seed provided by the environment.
out | Pointer to a u64[2] buffer which will contain the random seed on return. |
bool envIsSyscallHinted | ( | unsigned | svc | ) |
Returns whether a syscall is hinted to be available.
svc | Syscall number to test. |
Result envSetNextLoad | ( | const char * | path, |
const char * | argv | ||
) |
Configures the next homebrew application to load.
path | Path to the next homebrew application to load (.nro). |
argv | Argument string to pass. |
void envSetup | ( | void * | ctx, |
Handle | main_thread, | ||
LoaderReturnFn | saved_lr | ||
) |
Parses the homebrew loader environment block (internally called).
ctx | Reserved. |
main_thread | Reserved. |
saved_lr | Reserved. |