Bug in ETSLayoutMgr::DeleteReg()
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
ETSLayoutMgr::DeleteReg() doesn't actually work as advertised as it does not delete or overwrite the registry value (tested: Windows 10) A implementation that works would be:
HKEY hSectionKey = AfxGetApp()->GetSectionKey(lpszSection); if (hSectionKey) { auto err = RegDeleteValue(hSectionKey, lpszKey); RegCloseKey(hSectionKey); return (err == ERROR\_SUCCESS); } return false;
NOTE: Not regression tested on older versions of Windows.