MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / ReadSection

Method ReadSection

WinArk/IniFile.cpp:71–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71std::vector<CString> IniFile::ReadSection(PCWSTR section) {
72 WCHAR buffer[1 << 10];
73 std::vector<CString> names;
74 if (0 == ::GetPrivateProfileSection(section, buffer, _countof(buffer), _path))
75 return names;
76
77 names.reserve(8);
78 for (auto p = buffer; *p;) {
79 names.push_back(p);
80 // back���һ��Ԫ��
81 p += names.back().GetLength() + 1;
82 }
83 return names;
84}
85
86bool IniFile::WriteString(PCWSTR section, PCWSTR name, PCWSTR value) {
87 return ::WritePrivateProfileString(section, name, value, _path);

Callers 2

LoadFromFileMethod · 0.80
LoadMethod · 0.80

Calls 3

reserveMethod · 0.80
push_backMethod · 0.80
GetLengthMethod · 0.45

Tested by

no test coverage detected