Parameters
-
lpAppName [in]
-
The name of the section in the initialization file.
lpKeyName [in]
-
The name of the key whose value is to be retrieved. This value is in the form of a string; the GetPrivateProfileInt function converts the string into an integer and returns the integer.
nDefault [in]
-
The default value to return if the key name cannot be found in the initialization file.
lpFileName [in]
-
The name of the initialization file. If this parameter does not contain a full path to the file, the system searches for the file in the Windows directory.
Return Value
The return value is the integer equivalent of the string following the specified key name in the specified initialization file. If the key is not found, the return value is the specified default value.
Remarks
The function searches the file for a key that matches the name specified by the lpKeyName parameter under the section name specified by the lpAppName parameter. A section in the initialization file must have the following form:
The GetPrivateProfileInt function is not case-sensitive; the strings in lpAppName and lpKeyName can be a combination of uppercase and lowercase letters.
An application can use the GetProfileInt function to retrieve an integer value from the Win.ini file.