-static int regEnter(char*key,char*value)
-{
- HKEY hkey;
- int ret = 0;
- ret = RegCreateKey(HKEY_LOCAL_MACHINE, key, &hkey);
- if(ret != ERROR_SUCCESS) {
- fprintf(stderr, "registry: CreateKey %s failed\n", key);
- return 0;
- }
- ret = RegSetValue(hkey, NULL, REG_SZ, value, strlen(value)+1);
- if(ret != ERROR_SUCCESS) {
- fprintf(stderr, "registry: SetValue %s failed\n", key);
- return 0;
- }
- return 1;
-}
-