This commit was manufactured by cvs2svn to create branch 'captive'.
[reactos.git] / subsys / system / regedit / regproc.h
1 /*
2  * Copyright 1999 Sylvain St-Germain
3  * Copyright 2002 Andriy Palamarchuk
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  */
19
20 /******************************************************************************
21  * Defines and consts
22  */
23 #define KEY_MAX_LEN             1024
24
25 /* Return values */
26 #define SUCCESS               0
27 #define KEY_VALUE_ALREADY_SET 2
28
29 typedef void (*CommandAPI)(LPSTR lpsLine);
30
31 void doSetValue(LPSTR lpsLine);
32 void doDeleteValue(LPSTR lpsLine);
33 void doCreateKey(LPSTR lpsLine);
34 void doDeleteKey(LPSTR lpsLine);
35 void doQueryValue(LPSTR lpsLine);
36 void doRegisterDLL(LPSTR lpsLine);
37 void doUnregisterDLL(LPSTR lpsLine);
38
39 BOOL export_registry_key(CHAR *file_name, CHAR *reg_key_name);
40 BOOL import_registry_file(LPTSTR filename);
41 void delete_registry_key(CHAR *reg_key_name);
42
43 void setAppName(CHAR *name);
44 CHAR *getAppName();
45
46 void processRegLines(FILE *in, CommandAPI command);
47
48 /*
49  * Generic prototypes
50  */
51 char*   getToken(char** str, const char* delims);
52 void get_file_name(CHAR **command_line, CHAR *filename);
53 DWORD   convertHexToDWord(char *str, BYTE *buf);
54 DWORD   convertHexCSVToHex(char *str, BYTE *buf, ULONG bufLen);
55 LPSTR   convertHexToHexCSV( BYTE *buf, ULONG len);
56 LPSTR   convertHexToDWORDStr( BYTE *buf, ULONG len);
57 LPSTR   getRegKeyName(LPSTR lpLine);
58 HKEY    getRegClass(LPSTR lpLine);
59 DWORD   getDataType(LPSTR *lpValue, DWORD* parse_type);
60 LPSTR   getArg(LPSTR arg);
61 HRESULT openKey(LPSTR stdInput);
62 void    closeKey();
63
64 /*
65  * api setValue prototypes
66  */
67 void    processSetValue(LPSTR cmdline);
68 HRESULT setValue(LPSTR val_name, LPSTR val_data);
69
70 /*
71  * api queryValue prototypes
72  */
73 void    processQueryValue(LPSTR cmdline);