⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iniconfig.cpp

📁 让传奇3服务端支持动态域名的插件。VS2005的工程。这个是LOGINSER的插件。要和DBSER插件一起使用。
💻 CPP
字号:
#include "Stdafx.h"
#include "iniConfig.h"

//---------------------class INICONTROL-------------------------------------
INICONTROL::~INICONTROL()
{

}

INICONTROL::INICONTROL()
{
	IniFile_Patch = CfgIni_File;
}

BOOL INICONTROL::WriteStrToIni(LPTSTR MainKey, LPTSTR KeyName, LPTSTR Str)
{
	LPTSTR TabChr = _T(" ");
	LPTSTR Str_New = new TCHAR[_tcslen(TabChr) + _tcslen(Str) + 1];
	_tcscpy_s( Str_New , -1 , TabChr );
	_tcscat_s( Str_New , -1, Str );
	if(::WritePrivateProfileString( MainKey, KeyName, Str_New , IniFile_Patch ) )
	{
		delete [] Str_New;
		return true;
	}
	delete [] Str_New;
	return false;
}

BOOL INICONTROL::GetIntFromIni( LPTSTR MainKey, LPTSTR KeyName, int int_Str)
{
	int_Str = ::GetPrivateProfileInt( MainKey , KeyName ,  NULL, IniFile_Patch);
	if(int_Str == NULL)
		return false;
	return true;
}

BOOL INICONTROL::GetStrFromIni(LPTSTR MainKey, LPTSTR KeyName , LPTSTR Str)
{
	if(::GetPrivateProfileString( MainKey, KeyName , NULL , Str ,\
		-1, IniFile_Patch ) )//
		return true;
	return false;
}
//---------------------class INICONTROL end-------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -