ReactOS 0.4.15-dev-8127-g6338913
configparser.cpp File Reference
#include "rapps.h"
#include <debug.h>
Include dependency graph for configparser.cpp:

Go to the source code of this file.

Classes

struct  CLocaleSections
 
struct  CSectionNames
 

Functions

HRESULT ReadIniValue (LPCWSTR File, LPCWSTR Section, LPCWSTR Name, CStringW &Output)
 

Variables

static CSectionNames g_Names
 

Function Documentation

◆ ReadIniValue()

HRESULT ReadIniValue ( LPCWSTR  File,
LPCWSTR  Section,
LPCWSTR  Name,
CStringW Output 
)

Definition at line 29 of file configparser.cpp.

30{
31 for (DWORD len = 256, ret;; len *= 2)
32 {
33 ret = GetPrivateProfileString(Section, Name, L"\n", Output.GetBuffer(len), len, File);
34 if (ret + 1 != len)
35 {
36 Output.ReleaseBuffer(ret);
37 return ret && Output[0] != L'\n' ? ret : HRESULT_FROM_WIN32(ERROR_NOT_FOUND);
38 }
39 }
40}
Definition: File.h:16
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLsizei len
Definition: glext.h:6722
#define L(x)
Definition: ntvdm.h:50
@ Output
Definition: arc.h:85
int ret
#define GetPrivateProfileString
Definition: winbase.h:3835
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define ERROR_NOT_FOUND
Definition: winerror.h:690

Referenced by GetLocalizedSMFolderName(), and CConfigParser::GetSectionString().

Variable Documentation

◆ g_Names

CSectionNames g_Names
static

Definition at line 26 of file configparser.cpp.

Referenced by CConfigParser::CacheINI().