reactos/base/applications/rapps/include/configparser.h
Whindmar Saksit 57b775ef6e
[RAPPS] Automatically generate installer/uninstaller for downloaded zip/cab files (#6652)
With a single database line added to applications distributed as zip/cab allows rapps.exe to act as an installer that automatically extracts the files and creates a startmenu shortcut. It can also uninstall the extracted files (and optionally other files and registry entries created by the application).
2024-05-08 23:58:54 +02:00

28 lines
601 B
C++

#pragma once
#include <atlstr.h>
class CConfigParser
{
const CStringW szConfigPath;
CSimpleMap<CStringW, CStringW> m_Keys;
void
CacheINI();
void
ReadSection(CStringW &Buffer, const CStringW &Section, BOOL isArch);
public:
CConfigParser(const CStringW &FilePath);
BOOL
GetString(const CStringW &KeyName, CStringW &ResultString);
BOOL
GetInt(const CStringW &KeyName, INT &iResult);
UINT
GetSectionString(LPCWSTR Section, LPCWSTR Name, CStringW &Result);
};
HRESULT
ReadIniValue(LPCWSTR File, LPCWSTR Section, LPCWSTR Name, CStringW &Output);