Add context-sensitive Git History item
[git-cheetah/kirill.git] / registry.h
blob44bae4ede45f21aa4f96e3cd409556b856d8129f
1 /*
2 * This is basically a simplified regedit engine that supports
3 * custom patterns through get_registry_path() that is required
4 * to be provided by the clients.
6 * It attempts to convert values to LONG to create REG_DWORD values
7 */
9 #define MAX_REGISTRY_PATH MAX_PATH
11 #define CURRENT_WINDOWS "Software\\Microsoft\\Windows\\CurrentVersion\\"
12 #define APPROVED_EXT "Shell Extensions\\Approved"
13 #define CLASSES_ROOT "Software\\Classes\\"
15 typedef struct reg_value {
16 char *path;
17 char *name;
18 char *value;
19 } reg_value;
22 * Clients need to provide the implementation of this function.
23 * The simplest implementation includes just strcpy(dst, src);
25 char *get_registry_path(const char *src, char dst[MAX_REGISTRY_PATH]);
27 HRESULT create_reg_entries(const HKEY root, reg_value const info[]);
28 HRESULT delete_reg_entries(HKEY const root, reg_value const info[]);