| 348 | } |
| 349 | |
| 350 | BOOL registryDeleteKeyInf(const char *path, const char *inf) |
| 351 | { |
| 352 | HKEY root; |
| 353 | const char *key; |
| 354 | const char *subkey; |
| 355 | const char *root_inf = NULL; |
| 356 | |
| 357 | if(registrySplitPath(path, &root, &key, &subkey)) |
| 358 | { |
| 359 | for(const rootkey_t *rt = &rootkeys[0]; rt->name != NULL; rt++) |
| 360 | { |
| 361 | if(rt->key == root) |
| 362 | { |
| 363 | root_inf = rt->inf_root; |
| 364 | break; |
| 365 | } |
| 366 | } |
| 367 | |
| 368 | if(root_inf != NULL) |
| 369 | { |
| 370 | if(subkey == NULL) |
| 371 | { |
| 372 | sprintf(inf_line, "%s,%s\r\n", root_inf, key); |
| 373 | } |
| 374 | else |
| 375 | { |
| 376 | sprintf(inf_line, "%s,%s\\%s\r\n", root_inf, key, subkey); |
| 377 | } |
| 378 | |
| 379 | return addLine(inf, inf_line); |
| 380 | } |
| 381 | } |
| 382 | |
| 383 | return FALSE; |
| 384 | } |
no test coverage detected