MCPcopy Create free account
hub / github.com/DamRsn/NeuralNote / deleteRegPath

Function deleteRegPath

ThirdParty/ASIO/common/register.cpp:293–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291}
292
293static LONG deleteRegPath (HKEY mainkey,char *szregpath,char *szdelpath)
294{
295 HKEY hkey;
296 LONG cr,rc = -1;
297 KEYLIST klist;
298 LPKEYLIST pkl,k;
299 char *keyname = 0;
300
301 if ((cr = RegOpenKey(mainkey,szregpath,&hkey)) == ERROR_SUCCESS) {
302
303 keyname = new char[strlen(szdelpath)+1];
304 if (!keyname) {
305 RegCloseKey(hkey);
306 return rc;
307 }
308 strcpy(keyname,szdelpath);
309 klist.next = 0;
310
311 findAllSubKeys(hkey,0,0,keyname,&klist);
312
313 if (klist.next) {
314 pkl = klist.next;
315
316 while (pkl) {
317 RegCloseKey(pkl->subKey);
318 cr = RegDeleteKey(pkl->mainKey,pkl->keyname);
319 delete pkl->keyname;
320 k = pkl;
321 pkl = pkl->next;
322 delete k;
323 }
324 rc = 0;
325 }
326
327 RegCloseKey(hkey);
328 }
329
330 return rc;
331}
332

Callers 2

RegisterAsioDriverFunction · 0.85
UnregisterAsioDriverFunction · 0.85

Calls 1

findAllSubKeysFunction · 0.85

Tested by

no test coverage detected