/ Data Base delete line routine for INI access methods. */ /
| 311 | /* Data Base delete line routine for INI access methods. */ |
| 312 | /***********************************************************************/ |
| 313 | int TDBINI::DeleteDB(PGLOBAL g, int irc) |
| 314 | { |
| 315 | switch (irc) { |
| 316 | case RC_EF: |
| 317 | break; |
| 318 | case RC_FX: |
| 319 | while (ReadDB(g) == RC_OK) |
| 320 | if (!WritePrivateProfileString(Section, NULL, NULL, Ifile)) { |
| 321 | snprintf(g->Message, sizeof(g->Message), "Error %d accessing %s", |
| 322 | GetLastError(), Ifile); |
| 323 | return RC_FX; |
| 324 | } // endif |
| 325 | |
| 326 | break; |
| 327 | default: |
| 328 | if (!Section) { |
| 329 | snprintf(g->Message, sizeof(g->Message), MSG(NO_SECTION_NAME)); |
| 330 | return RC_FX; |
| 331 | } else |
| 332 | if (!WritePrivateProfileString(Section, NULL, NULL, Ifile)) { |
| 333 | snprintf(g->Message, sizeof(g->Message), "Error %d accessing %s", |
| 334 | GetLastError(), Ifile); |
| 335 | return RC_FX; |
| 336 | } // endif rc |
| 337 | |
| 338 | } // endswitch irc |
| 339 | |
| 340 | return RC_OK; |
| 341 | } // end of DeleteDB |
| 342 | |
| 343 | /***********************************************************************/ |
| 344 | /* Data Base close routine for INI access methods. */ |
nothing calls this directly
no test coverage detected