MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / IniDelete

Method IniDelete

source/script_registry.cpp:167–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165
166
167ResultType Line::IniDelete(LPTSTR aFilespec, LPTSTR aSection, LPTSTR aKey)
168// Note that aKey can be NULL, in which case the entire section will be deleted.
169{
170 TCHAR szFileTemp[T_MAX_PATH];
171 TCHAR *szFilePart;
172 // Get the fullpathname (ini functions need a full path)
173 GetFullPathName(aFilespec, _countof(szFileTemp), szFileTemp, &szFilePart);
174 BOOL result = WritePrivateProfileString(aSection, aKey, NULL, szFileTemp); // Returns zero on failure.
175 g->LastError = GetLastError();
176 WritePrivateProfileString(NULL, NULL, NULL, szFileTemp); // Flush
177 return SetLastErrorMaybeThrow(!result);
178}
179
180
181

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected