Some more std::string changes.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
Andrea Odetti
2019-09-07 19:37:19 +01:00
parent be476f9a9c
commit bd201202cd
14 changed files with 60 additions and 56 deletions
+3 -3
View File
@@ -87,7 +87,7 @@ BOOL RegLoadValue (LPCTSTR section, LPCTSTR key, BOOL peruser, DWORD* value, DWO
}
//===========================================================================
void RegSaveString (LPCTSTR section, LPCTSTR key, BOOL peruser, LPCTSTR buffer) {
void RegSaveString (LPCTSTR section, LPCTSTR key, BOOL peruser, const std::string & buffer) {
TCHAR fullkeyname[256];
StringCbPrintf(fullkeyname, 256, TEXT("Software\\AppleWin\\CurrentVersion\\%s"), section);
@@ -110,8 +110,8 @@ void RegSaveString (LPCTSTR section, LPCTSTR key, BOOL peruser, LPCTSTR buffer)
key,
0,
REG_SZ,
(CONST LPBYTE)buffer,
(_tcslen(buffer) + 1) * sizeof(TCHAR));
(CONST LPBYTE)buffer.c_str(),
(buffer.size() + 1) * sizeof(TCHAR));
RegCloseKey(keyhandle);
}
}