MCPcopy Create free account
hub / github.com/JHRobotics/softgpu / registryDeleteKeyInf

Function registryDeleteKeyInf

winreg.c:350–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348}
349
350BOOL 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}

Callers 1

apply_deleteFunction · 0.85

Calls 2

registrySplitPathFunction · 0.85
addLineFunction · 0.85

Tested by

no test coverage detected