Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
46
Server/ToolProject/SeverSetupDlg/misc/INIFunctions.cpp
Normal file
46
Server/ToolProject/SeverSetupDlg/misc/INIFunctions.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Լ<EFBFBD>
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#include "../stdafx.h"
|
||||
#include "INIFunctions.h"
|
||||
|
||||
bool WriteStringToReg(const TCHAR *FileName_In, const TCHAR *Section_In,
|
||||
const TCHAR *KeyName_In, const TCHAR *Value_In)
|
||||
{
|
||||
return 0 != WritePrivateProfileString(Section_In, KeyName_In, Value_In, FileName_In);
|
||||
}
|
||||
|
||||
bool ReadStringFromReg(const TCHAR *FileName_In, const TCHAR *Section_In,
|
||||
const TCHAR *KeyName_In, TCHAR *Value_Out, int nMaxBuffer)
|
||||
{
|
||||
return (0 <= GetPrivateProfileString(Section_In, KeyName_In, "", Value_Out, nMaxBuffer, FileName_In));
|
||||
}
|
||||
|
||||
bool ReadStringFromReg(const TCHAR *FileName_In, const TCHAR *Section_In,
|
||||
const TCHAR *KeyName_In, CString& Value_Out, int nMaxBuffer)
|
||||
{
|
||||
TCHAR* szBuffer =
|
||||
reinterpret_cast<TCHAR*>(_alloca(nMaxBuffer * sizeof(TCHAR)));
|
||||
|
||||
if (0 <= GetPrivateProfileString(Section_In, KeyName_In, "", szBuffer, nMaxBuffer, FileName_In))
|
||||
{
|
||||
Value_Out.SetString(szBuffer);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool WriteStructToReg(const TCHAR *FileName_In, const TCHAR *Section_In,
|
||||
const TCHAR *KeyName_In, void *Value_In, int Size_in)
|
||||
{
|
||||
return 0 != WritePrivateProfileStruct(Section_In, KeyName_In, Value_In, Size_in, FileName_In);
|
||||
}
|
||||
|
||||
bool ReadStructFromReg(const TCHAR *FileName_In, const TCHAR *Section_In,
|
||||
const TCHAR *KeyName_In, void *Value_Out, int Size_in)
|
||||
{
|
||||
return 0 != GetPrivateProfileStruct(Section_In, KeyName_In, Value_Out, Size_in, FileName_In);
|
||||
}
|
||||
Reference in New Issue
Block a user