2017-08-18 09:29:54 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2017 Hugh McMaster
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __REG_H__
|
|
|
|
#define __REG_H__
|
|
|
|
|
2021-03-24 08:08:58 +00:00
|
|
|
#include <stdlib.h>
|
2021-03-18 11:36:49 +00:00
|
|
|
#include <windows.h>
|
2017-08-18 09:29:54 +00:00
|
|
|
#include "resource.h"
|
|
|
|
|
2017-12-05 11:25:16 +00:00
|
|
|
#define MAX_SUBKEY_LEN 257
|
2017-08-18 09:30:04 +00:00
|
|
|
|
|
|
|
/* reg.c */
|
2021-03-17 12:38:04 +00:00
|
|
|
struct reg_type_rels {
|
|
|
|
DWORD type;
|
|
|
|
const WCHAR *name;
|
|
|
|
};
|
|
|
|
|
2022-06-23 21:21:25 +00:00
|
|
|
extern const struct reg_type_rels type_rels[9];
|
2021-03-17 12:38:04 +00:00
|
|
|
|
2017-12-03 06:50:15 +00:00
|
|
|
void output_writeconsole(const WCHAR *str, DWORD wlen);
|
2017-11-02 09:21:30 +00:00
|
|
|
void WINAPIV output_message(unsigned int id, ...);
|
2021-03-17 12:38:04 +00:00
|
|
|
void WINAPIV output_string(const WCHAR *fmt, ...);
|
2017-12-03 06:50:15 +00:00
|
|
|
BOOL ask_confirm(unsigned int msgid, WCHAR *reg_info);
|
2017-08-18 09:30:04 +00:00
|
|
|
HKEY path_get_rootkey(const WCHAR *path);
|
2017-12-03 06:50:24 +00:00
|
|
|
WCHAR *build_subkey_path(WCHAR *path, DWORD path_len, WCHAR *subkey_name, DWORD subkey_len);
|
2021-04-05 13:24:11 +00:00
|
|
|
WCHAR *get_long_key(HKEY root, WCHAR *path);
|
|
|
|
BOOL parse_registry_key(const WCHAR *key, HKEY *root, WCHAR **path);
|
2021-04-01 12:20:48 +00:00
|
|
|
BOOL is_char(const WCHAR s, const WCHAR c);
|
2021-03-18 11:36:48 +00:00
|
|
|
BOOL is_switch(const WCHAR *s, const WCHAR c);
|
2017-08-18 09:30:04 +00:00
|
|
|
|
2021-03-17 12:38:06 +00:00
|
|
|
/* add.c */
|
2021-05-17 13:41:04 +00:00
|
|
|
int reg_add(int argc, WCHAR *argvW[]);
|
2021-03-17 12:38:06 +00:00
|
|
|
|
2021-05-17 13:41:05 +00:00
|
|
|
/* copy.c */
|
|
|
|
int reg_copy(int argc, WCHAR *argvW[]);
|
|
|
|
|
2021-03-17 12:38:05 +00:00
|
|
|
/* delete.c */
|
2021-03-30 12:00:12 +00:00
|
|
|
int reg_delete(int argc, WCHAR *argvW[]);
|
2021-03-17 12:38:05 +00:00
|
|
|
|
2021-03-17 12:38:04 +00:00
|
|
|
/* export.c */
|
2021-03-18 11:36:52 +00:00
|
|
|
int reg_export(int argc, WCHAR *argvW[]);
|
2021-03-17 12:38:04 +00:00
|
|
|
|
2017-08-18 09:30:04 +00:00
|
|
|
/* import.c */
|
2021-03-18 11:36:51 +00:00
|
|
|
int reg_import(int argc, WCHAR *argvW[]);
|
2017-08-18 09:29:54 +00:00
|
|
|
|
2021-03-17 12:38:04 +00:00
|
|
|
/* query.c */
|
2021-03-26 12:30:04 +00:00
|
|
|
int reg_query(int argc, WCHAR *argvW[]);
|
2017-12-03 06:50:09 +00:00
|
|
|
|
2017-08-18 09:29:54 +00:00
|
|
|
#endif /* __REG_H__ */
|