home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 February
/
Chip_2002-02_cd1.bin
/
sharewar
/
apaths
/
APSOURCE.ZIP
/
KillSKey.c
< prev
next >
Wrap
C/C++ Source or Header
|
2001-03-26
|
949b
|
41 lines
/* KillSKey - March 26th, 2001
**
** Copyright (c) 1997-2001 by Gregory Braun. All rights reserved.
**
** This function removes the specified RunServices values.
**
** Called: srv = a pointer to the SRV data structure to use.
**
** Returns: TRUE upon success, or FALSE if an error exists.
*/
#include "AppPaths.h"
extern BOOL far KillSKey (LPSRV srv)
{
auto HKEY key = NULL;
auto LONG err;
auto char sub[PSTRING];
lstrcpy (sub,REGSTR_PATH_RUNSERVICES);
err = RegOpenKeyEx (HKEY_LOCAL_MACHINE,
sub,
NIL,
KEY_WRITE,
&key);
if (err != ERROR_SUCCESS)
return (FALSE);
err = RegDeleteValue (key,srv->name);
RegCloseKey (key);
return ((err == ERROR_SUCCESS) ? TRUE : FALSE);
}
/* end of KillSKey.c - written by Gregory Braun */