// 下列 ifdef 块是创建使从 DLL 导出更简单的 // 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 CINIFILE_EXPORTS // 符号编译的。在使用此 DLL 的 // 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将 // CINIFILE_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的 // 符号视为是被导出的。 #ifndef CINIFILE_EXPORTS #ifdef _WIN64 #ifdef _DEBUG #pragma comment(lib, "CIniFileX64D.lib") #else #pragma comment(lib, "CIniFileX64.lib") #endif #else #ifdef _DEBUG #pragma comment(lib, "CIniFileD.lib") #else #pragma comment(lib, "CIniFile.lib") #endif #endif #endif #ifdef CINIFILE_EXPORTS #define CINIFILE_API __declspec(dllexport) #define CINIFILE_C_API extern "C" __declspec(dllexport) #else #define CINIFILE_API __declspec(dllimport) #define CINIFILE_C_API extern "C" __declspec(dllimport) #endif CINIFILE_C_API bool CIniFileCreat(const char* FilePath); CINIFILE_C_API bool CIniFileSetItemByKey(const char* strSection, const char* strVarName, const char* strItem); CINIFILE_C_API bool CIniFileSetValueByKey(const char* strVarName, const char* strItem); CINIFILE_C_API bool CIniFileSetTrixellSetting(const char* strSection, const char* strVarHalfName, const char* strVarName, const char* strVar, int nType); //根据key 确认该项是否存在 CINIFILE_C_API bool CIniFileGetValueByKey(const char* strItem, char* strReturnValue); //根据key和value 确认该项是否存在 CINIFILE_C_API bool CIniFileGetValueByKey2(const char* strItem, const char* strValue); CINIFILE_C_API bool CIniFileGetValueByKey3(const char* strItem, char* strLeftValue, char* strRightValue); CINIFILE_C_API bool CIniFileGetValueByKey4(const char* strItem, char* strReturnValue); CINIFILE_C_API bool CIniFileGetValueByKey5(const char* strItem, const char* strValue, char* strReturnValue); CINIFILE_C_API bool CIniFileClose(); CINIFILE_C_API bool CIniFileCloseWithoutWrite();