[Dev-C++] Flush or set valeu from a key of Registry.
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <we...@ha...> - 2002-07-23 21:01:45
|
Hi,
I want to flush (delete) a string value from registry.
I tryed to set it to 0 of this mode:
#include <windows.h>
int main(int argc, char *argv[])
{
HKEY hKey;
DWORD dwDisposition;
unsigned char *szBuf = (unsigned char *)strdup("0");
if (RegSetValueEx(HKEY_CURRENT_USER,
"\\Software\\Microsoft\\Security\\say\\", 0, REG_SZ, szBuf,
strlen((char*)szBuf)) != ERROR_SUCCESS)
return 1;
RegCloseKey(hKey);
return 0;
}
But it didn't set the value of:
\\HKEY_CURRENT_USER\\Software\\Microsoft\\Security\\say to "0". It crate a
key \\Software\\Microsoft\\Security\\say in \\HKEY_CURRENT_USER . :P
How to do to is set this value ??
And how to for example delete a key \\Software\\Microsoft\\Security\\say\\
??
Can someone gave examples ?? :)
Thkz and Best Regards.
[ ]'s
|