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