特别搜查死囚来信在线:求VC中有关API编程/函数 的资料

来源:百度文库 编辑:高校问答 时间:2024/04/28 21:50:48
很想知道关于setConfig/GetPrivateProfileString/GetProfileInt /GetProfileString /WritePrivateProfileString /WriteProfileString
这几个函数的应用
英文的 有没有中文说明的啊

SetConfig()函数不存在,其余的如下,虽然都是英文,但比较权威

DWORD GetPrivateProfileString(
LPCTSTR lpAppName, // points to section name
LPCTSTR lpKeyName, // points to key name
LPCTSTR lpDefault, // points to default string
LPTSTR lpReturnedString, // points to destination buffer
DWORD nSize, // size of destination buffer
LPCTSTR lpFileName // points to initialization filename
);

The GetProfileInt function retrieves an integer from the specified key name in the given section of the WIN.INI file. This function is provided for compatibility with 16-bit Windows-based applications. Win32-based applications should store initialization information in the registry.

UINT GetProfileInt(
LPCTSTR lpAppName, // address of section name
LPCTSTR lpKeyName, // address of key name
INT nDefault // default value if key name is not found
);

The GetProfileString function retrieves the string associated with the specified key in the given section of the WIN.INI file. This function is provided for compatibility with 16-bit Windows-based applications. Win32-based applications should store initialization information in the registry.

DWORD GetProfileString(
LPCTSTR lpAppName, // address of section name
LPCTSTR lpKeyName, // address of key name
LPCTSTR lpDefault, // address of default string
LPTSTR lpReturnedString, // address of destination buffer
DWORD nSize // size of destination buffer
);

The WritePrivateProfileString function copies a string into the specified section of the specified initialization file.

This function is provided for compatibility with 16-bit Windows-based applications. WIn32-based applications should store initialization information in the registry.

BOOL WritePrivateProfileString(
LPCTSTR lpAppName, // pointer to section name
LPCTSTR lpKeyName, // pointer to key name
LPCTSTR lpString, // pointer to string to add
LPCTSTR lpFileName // pointer to initialization filename
);

The WriteProfileString function copies a string into the specified section of the WIN.INI file.

This function is provided for compatibility with 16-bit Windows-based applications. Win32-based applications should store initialization information in the registry.

BOOL WriteProfileString(
LPCTSTR lpAppName, // pointer to section name
LPCTSTR lpKeyName, // pointer to key name
LPCTSTR lpString // pointer to string to write
);