ReactOS 0.4.15-dev-7842-g558ab78
regproc.h
Go to the documentation of this file.
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
29typedef void (*CommandAPI)(LPTSTR lpsLine);
30
31void doSetValue(LPTSTR lpsLine);
32void doDeleteValue(LPTSTR lpsLine);
33void doCreateKey(LPTSTR lpsLine);
34void doDeleteKey(LPTSTR lpsLine);
35void doQueryValue(LPTSTR lpsLine);
36void doRegisterDLL(LPTSTR lpsLine);
37void doUnregisterDLL(LPTSTR lpsLine);
38
41void delete_registry_key(TCHAR* reg_key_name);
42
44
45/*
46 * Generic prototypes
47 */
48#ifdef _UNICODE
49#define get_file_name get_file_nameW
50#else
51#define get_file_name get_file_nameA
52#endif
53
54char* getToken(char** str, const char* delims);
55void get_file_nameA(CHAR** command_line, CHAR* filename, int max_filename);
56void get_file_nameW(CHAR** command_line, WCHAR* filename, int max_filename);
62HKEY getRegClass(LPTSTR lpLine);
65HRESULT openKey(LPTSTR stdInput);
66void closeKey(VOID);
67
68/*
69 * api setValue prototypes
70 */
72HRESULT setValue(LPTSTR val_name, LPTSTR val_data);
73
74/*
75 * api queryValue prototypes
76 */
78
79#ifdef __GNUC__
80#ifdef WIN32_REGDBG
81//typedef UINT_PTR SIZE_T, *PSIZE_T;
82//#define _MAX_PATH 260 /* max. length of full pathname */
83#endif /*WIN32_REGDBG*/
84
85#ifdef UNICODE
86#define _tfopen _wfopen
87#else
88#define _tfopen fopen
89#endif
90
91#endif /*__GNUC__*/
92
94 HANDLE hHeap, // handle to private heap block
95 DWORD dwFlags, // heap allocation control
96 SIZE_T dwBytes // number of bytes to allocate
97);
98
100 HANDLE hHeap, // handle to heap block
101 DWORD dwFlags, // heap reallocation options
102 LPVOID lpMem, // pointer to memory to reallocate
103 SIZE_T dwBytes // number of bytes to reallocate
104);
105
107 HANDLE hHeap, // handle to heap
108 DWORD dwFlags, // heap free options
109 LPVOID lpMem // pointer to memory
110);
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLuint in
Definition: glext.h:9616
GLenum GLsizei len
Definition: glext.h:6722
const char * filename
Definition: ioapi.h:137
static LPCWSTR file_name
Definition: protocol.c:147
void closeKey(VOID)
Definition: regproc.c:604
LPTSTR getRegKeyName(LPTSTR lpLine)
Definition: regproc.c:536
void processQueryValue(LPTSTR cmdline)
Definition: regproc.c:770
void doDeleteKey(LPTSTR lpsLine)
Definition: regproc.c:695
void(* CommandAPI)(LPTSTR lpsLine)
Definition: regproc.h:29
LPVOID RegHeapReAlloc(HANDLE hHeap, DWORD dwFlags, LPVOID lpMem, SIZE_T dwBytes)
LPTSTR convertHexToHexCSV(BYTE *buf, ULONG len)
Definition: regproc.c:246
void doSetValue(LPTSTR lpsLine)
Definition: regproc.c:619
void get_file_nameA(CHAR **command_line, CHAR *filename, int max_filename)
Definition: regproc.c:160
HRESULT openKey(LPTSTR stdInput)
Definition: regproc.c:494
void processSetValue(LPTSTR cmdline)
Definition: regproc.c:716
void doRegisterDLL(LPTSTR lpsLine)
Definition: regproc.c:994
HRESULT setValue(LPTSTR val_name, LPTSTR val_data)
Definition: regproc.c:432
DWORD getDataType(LPTSTR *lpValue, DWORD *parse_type)
Definition: regproc.c:331
void doUnregisterDLL(LPTSTR lpsLine)
Definition: regproc.c:1024
LPTSTR convertHexToDWORDStr(BYTE *buf, ULONG len)
Definition: regproc.c:272
void doQueryValue(LPTSTR lpsLine)
Definition: regproc.c:653
void delete_registry_key(TCHAR *reg_key_name)
Definition: regproc.c:1459
BOOL import_registry_file(LPTSTR filename)
Definition: regproc.c:1396
DWORD convertHexToDWord(TCHAR *str, BYTE *buf)
Definition: regproc.c:231
LPVOID RegHeapAlloc(HANDLE hHeap, DWORD dwFlags, SIZE_T dwBytes)
DWORD convertHexCSVToHex(TCHAR *str, BYTE *buf, ULONG bufLen)
Definition: regproc.c:289
void doDeleteValue(LPTSTR lpsLine)
Definition: regproc.c:686
void doCreateKey(LPTSTR lpsLine)
Definition: regproc.c:704
LPTSTR getArg(LPTSTR arg)
Definition: regproc.c:377
char * getToken(char **str, const char *delims)
void processRegLines(FILE *in, CommandAPI command)
Definition: regproc.c:887
HKEY getRegClass(LPTSTR lpLine)
Definition: regproc.c:567
BOOL export_registry_key(TCHAR *file_name, TCHAR *reg_key_name)
Definition: regproc.c:1310
BOOL RegHeapFree(HANDLE hHeap, DWORD dwFlags, LPVOID lpMem)
void get_file_nameW(CHAR **command_line, WCHAR *filename, int max_filename)
Definition: regproc.c:205
const WCHAR * str
int parse_type(Type t, const vector< string > &tokens, int off, vector< string > &names, vector< string > &dependencies)
Definition: sdkparse.cpp:653
TCHAR * cmdline
Definition: stretchblt.cpp:32
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint32_t ULONG
Definition: typedefs.h:59
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
char TCHAR
Definition: xmlstorage.h:189
__wchar_t WCHAR
Definition: xmlstorage.h:180
CHAR * LPTSTR
Definition: xmlstorage.h:192
char CHAR
Definition: xmlstorage.h:175
unsigned char BYTE
Definition: xxhash.c:193