AIT_GetProfileFirstSection

Description

Acquires the first key and its value from a specified INI file section.

Format

bool AIT_GetProfileFirstSection  (
 string strIniFileName,     // INI filename
 string strSectionName,     // INI file's section name
 string strValues           // Section data
);

Parameters

strIniFileName (input)

Specify an INI filename.

strSectionName (input)

Specify the name of a section in an INI file.

strValues (output)

Specify a variable to receive a key and its value from a set section. When the function returns, the variable stores a key and its value. A key and its value are combined in the key=value format.

Return values

The return value is true if the function was executed normally, and false if not. If the function has returned false, you can use AIT_GetLastError to acquire an extended error code. The following gives the error codes that AIT_GetLastError might return:

Extended error numberError code
2ERROR_FILE_NOT_FOUND
3ERROR_PATH_NOT_FOUND
5ERROR_ACCESS_DENIED
6ERROR_INVALID_HANDLE
8ERROR_NOT_ENOUGH_MEMORY
14ERROR_OUTOFMEMORY
15ERROR_INVALID_DRIVE
21ERROR_NOT_READY
38ERROR_HANDLE_EOF
53ERROR_BAD_NETPATH
87ERROR_INVALID_PARAMETER
112ERROR_DISK_FULL
123ERROR_INVALID_NAME
148ERROR_PATH_BUSY
161ERROR_BAD_PATHNAME
998ERROR_NOACCESS
1005ERROR_UNRECOGNIZED_VOLUME
1169ERROR_NO_MATCH
1210ERROR_INVALID_COMPUTERNAME
1214ERROR_INVALID_NETNAME
1231ERROR_NETWORK_UNREACHABLE