* WritePrivateProfileStringA (KERNEL32.@) ***********************************************************************/
| 1223 | * WritePrivateProfileStringA (KERNEL32.@) |
| 1224 | ***********************************************************************/ |
| 1225 | BOOL 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 | /*********************************************************************** |
no test coverage detected