 |
GetProfileString ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
Retrieves the string associated with a key in the specified section of the Win.ini file. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
DWORD GetProfileString(
LPCTSTR lpAppName, // section name
LPCTSTR lpKeyName, // key name
LPCTSTR lpDefault, // default string
LPTSTR lpReturnedString, // destination buffer
DWORD nSize // size of destination buffer
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER GetProfileString IN kernel32;
STRING lpAppName,;
STRING lpKeyName,;
STRING lpDefault,;
STRING @ lpReturnedString,;
INTEGER nSize
|
 |
 |
 |
| Parameters: |
 |
lpAppName
[in] Pointer to a null-terminated string that specifies the name of the section containing the key.
lpKeyName
[in] Pointer to a null-terminated string specifying the name of the key whose associated string is to be retrieved.
lpDefault
[in] Pointer to a null-terminated default string.
lpReturnedString
[out] Pointer to a buffer that receives the character string.
nSize
[in] Specifies the size, in TCHARs, of the buffer pointed to by the lpReturnedString parameter. |
 |
 |
| Return value: |
 |
| The return value is the number of characters copied to the buffer, not including the null-terminating character. |
 |
 |
| Usage: |
 |
LOCAL cBuffer
cBuffer = REPLICATE(CHR(0), 120)
= GetProfileString("Windows", "Device", ",,,",;
@cBuffer, LEN(cBuffer))
* return:
* \\myserver\HP LaserJet 4100 Series PS,winspool,Ne01:
|
 |
 |
| My comment: |
 |
A section in the Win.ini file must have the following form:
[section]
key=string
|
 |
 |
| Word Index links for the GetProfileString : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2001-09-04 12:00:00 | | Modified: | 2010-05-19 17:05:41 | Visited in last 7 days: 80 |