GetEnvironmentVariable

nn::hio::CTR::GetEnvironmentVariable Function

Syntax

s32 GetEnvironmentVariable(
     char * buf,
     size_t length,
     const char * name
);

Arguments

Name Description
out buf Pointer to the buffer that will store the environment variable.
in length Buffer size.
in name Name of the environment variable.

Return Values

Returns the actual number of bytes that were copied. If an error occurred, returns -1.

Description

Gets the environment variable and returns the number of bytes copied to the buffer.

The value of the environment variable specified by name is stored in buf.
If the environment variable does not exist, " \0 " is stored at the start of the buffer.

Revision History

2010/06/14
Added description of arguments and behavior.
2010/03/31
Initial version.

CONFIDENTIAL