GetPrivateProfileString &&WritePrivateProfileString 调用系统读写

这两个函数主要用于与16位Windows应用兼容,但现在推荐使用注册表存储初始化信息。GetPrivateProfileString从指定段中获取字符串,WritePrivateProfileString将字符串写入初始化文件的指定段。若提供的缓冲区太小,字符串会被截断并添加空字符。函数失败或刷新缓存时返回值为0,成功则非0。
摘要由CSDN通过智能技术生成

GetPrivateProfileString Function

Retrieves a string from the specified section in an initialization file.

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

DWORD WINAPI GetPrivateProfileString(
  __in          LPCTSTR lpAppName,
  __in          LPCTSTR lpKeyName,
  __in          LPCTSTR lpDefault,
  __out         LPTSTR lpReturnedString,
  __in          DWORD nSize,
  __in          LPCTSTR lpFileName
);
Parameters
lpAppName

The name of the section containing the key name. If this parameter is NULL, the GetPrivateProfileString function copies all section names in the file to the supplied buffer.

lpKeyName
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值