开发语言:C/C++
支持平台:Windows、Windows CE
实现功能:
实现了一个类CRWINIFILE,提供如下接口函数:
LoadFile
CloseFile
GetProfileString
GetProfileInt
GetProfileSection
GetProfileSectionNames
WriteProfileString
WriteProfileSection
WriteProfileStruct
GetProfileStruct
下载地址:
更新历史:
V1.2.1 2010年12月18日
将包含文件从实现文件移到头文件,如出现因造成的编译错误,请将"RWINIFILE.h"作为第一个包含头文件。
V1.2 2010年05月11日
给一些函数添加了缺省参数值。
V1.1 2010年02月10日
代码优化。支持Windows、Windows CE
V1.0 2009年04月28日
完成正式版本。支持Windows、Windows CE
附加说明:
通过阅读该代码,可以让初学者快速掌握如何操作内存映射文件。
源代码
RWINIFILE.h
/* ----------------------------------------------------------
文件名称:RWINIFILE.h
作者:秦建辉
MSN:splashcn@msn.com
当前版本:V1.2.1
历史版本:
V1.2.12010年12月18日
将包含文件从实现文件移到头文件,如出现因造成的编译错误,请将"RWINIFILE.h"作为第一个包含头文件。
V1.22010年05月11日
给一些函数添加了缺省参数值。
V1.12010年02月10日
代码优化。支持Windows、Windows CE
V1.02009年04月28日
完成正式版本。支持Windows、Windows CE
功能描述:
基于内存映射方式读写ini文件
类接口函数:
LoadFile
CloseFile
GetProfileString
GetProfileInt
GetProfileSection
GetProfileSectionNames
WriteProfileString
WriteProfileSection
WriteProfileStruct
GetProfileStruct
ini文件语法规范:
如果开启UNICODE编译选项,则要求配置文件编码为utf-16,否则要求配置文件编码为utf-8。配置文件可以有BOM标记。
行首字符如果是;或者#,表示该行是注释
行首字符为[,表示该行是分区名。分区名必须严格为[Appname]。
------------------------------------------------------------ */
#pragma once
#include
#include
class CRWINIFILE
{
public:
/*
功能