MCPcopy Create free account
hub / github.com/MariaDB/server / WritePrivateProfileString

Function WritePrivateProfileString

storage/connect/inihandl.cpp:1225–1252  ·  view source on GitHub ↗

* WritePrivateProfileStringA (KERNEL32.@) ***********************************************************************/

Source from the content-addressed store, hash-verified

1223 * WritePrivateProfileStringA (KERNEL32.@)
1224 ***********************************************************************/
1225BOOL WritePrivateProfileString(LPCSTR section, LPCSTR entry,
1226 LPCSTR string, LPCSTR filename)
1227{
1228 BOOL ret = FALSE;
1229
1230 EnterCriticalSection( &PROFILE_CritSect );
1231
1232 if (PROFILE_Open(filename)) {
1233 if (!section && !entry && !string) /* documented "file flush" case */
1234 PROFILE_ReleaseFile(); /* always return FALSE in this case */
1235 else {
1236 if (!section) {
1237 //FIXME("(NULL?,%s,%s,%s)? \n",entry,string,filename);
1238 } else {
1239 ret = PROFILE_SetString(section, entry, string, FALSE);
1240
1241 if (ret)
1242 ret = PROFILE_FlushFile();
1243
1244 } // endif section
1245
1246 } // endif section || entry|| string
1247
1248 } // endif Open
1249
1250 LeaveCriticalSection( &PROFILE_CritSect );
1251 return ret;
1252} // end of WritePrivateProfileString
1253
1254
1255/***********************************************************************

Callers 6

fix_sectionFunction · 0.85
change_service_configFunction · 0.85
WritePrivateProfileIntFunction · 0.85
DeleteDBMethod · 0.85
WriteColumnMethod · 0.85
mainFunction · 0.85

Calls 4

PROFILE_OpenFunction · 0.85
PROFILE_ReleaseFileFunction · 0.85
PROFILE_SetStringFunction · 0.85
PROFILE_FlushFileFunction · 0.85

Tested by

no test coverage detected