windows下ini配置现金盘平台出租的读写

对ini文件进行写操作用到函数
现金盘平台出租(企 娥:217 1793 408)
BOOL
WINAPI
WritePrivateProfileStringA(
in_opt LPCSTR lpAppName,
__in_opt LPCSTR lpKeyName,
in_opt LPCSTR lpString,
__in_opt LPCSTR lpFileName
);

其中lpAppName为分节名字,lpKeyName为键的名字,lpString为对应键的字符串的值,lpFileName为完整的文件名,这个文件可以存在,也可以不存在,不存在则会创建,如果存在则会覆盖原来的内容

另外还有其他的函数

// 写入结构体

BOOL WritePrivateProfileStruct(
LPCTSTR lpszSection, // pointer to section name
LPCTSTR lpszKey, // pointer to key name
LPVOID lpStruct, // 要写入的数据缓冲区
UINT uSizeStruct, // 缓冲区的大小
LPCTSTR szFile // pointer to initialization filename
);

// 写入整个键值,lpString 为“key=value”的格式
BOOL WritePrivateProfileSection(

LPCTSTR lpAppName, // pointer to string with section name 
LPCTSTR lpString, // 写入的字符串
LPCTSTR lpFileName  // pointer to string with filename 

);

猜你喜欢

转载自blog.51cto.com/13881005/2148072