ReactOS  r76032
reg.c File Reference
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <winuser.h>
#include <winreg.h>
#include <wincon.h>
#include <shlwapi.h>
#include <wine/unicode.h>
#include <wine/debug.h>
#include "reg.h"
Include dependency graph for reg.c:

Go to the source code of this file.

Macros

#define MAX_SUBKEY_LEN   257
 

Enumerations

enum  operations {
  REG_ADD, REG_DELETE, REG_IMPORT, REG_QUERY,
  REG_INVALID
}
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (reg)
 
voidheap_xalloc (size_t size)
 
voidheap_xrealloc (void *buf, size_t size)
 
BOOL heap_free (void *buf)
 
static void output_writeconsole (const WCHAR *str, DWORD wlen)
 
static void output_formatstring (const WCHAR *fmt, __ms_va_list va_args)
 
void __cdecl output_message (unsigned int id,...)
 
static void __cdecl output_string (const WCHAR *fmt,...)
 
static BOOL ask_confirm (unsigned int msgid, WCHAR *reg_info)
 
static BOOL path_rootname_cmp (const WCHAR *input_path, const WCHAR *rootkey_name)
 
HKEY path_get_rootkey (const WCHAR *path)
 
static DWORD wchar_get_type (const WCHAR *type_name)
 
static BYTE hexchar_to_byte (WCHAR ch)
 
static LPBYTE get_regdata (const WCHAR *data, DWORD reg_type, WCHAR separator, DWORD *reg_count)
 
static BOOL sane_path (const WCHAR *key)
 
static int reg_add (HKEY root, WCHAR *path, WCHAR *value_name, BOOL value_empty, WCHAR *type, WCHAR separator, WCHAR *data, BOOL force)
 
static int reg_delete (HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name, BOOL value_empty, BOOL value_all, BOOL force)
 
static WCHARreg_data_to_wchar (DWORD type, const BYTE *src, DWORD size_bytes)
 
static const WCHARreg_type_to_wchar (DWORD type)
 
static void output_value (const WCHAR *value_name, DWORD type, BYTE *data, DWORD data_size)
 
static WCHARbuild_subkey_path (WCHAR *path, DWORD path_len, WCHAR *subkey_name, DWORD subkey_len)
 
static int query_value (HKEY key, WCHAR *value_name, WCHAR *path, BOOL recurse)
 
static int query_all (HKEY key, WCHAR *path, BOOL recurse)
 
static int reg_query (HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name, BOOL value_empty, BOOL recurse)
 
static WCHARget_long_key (HKEY root, WCHAR *path)
 
static BOOL parse_registry_key (const WCHAR *key, HKEY *root, WCHAR **path, WCHAR **long_key)
 
static BOOL is_help_switch (const WCHAR *s)
 
static enum operations get_operation (const WCHAR *str, int *op_help)
 
int wmain (int argc, WCHAR *argvW[])
 

Variables

static const WCHAR short_hklm [] = {'H','K','L','M',0}
 
static const WCHAR short_hkcu [] = {'H','K','C','U',0}
 
static const WCHAR short_hkcr [] = {'H','K','C','R',0}
 
static const WCHAR short_hku [] = {'H','K','U',0}
 
static const WCHAR short_hkcc [] = {'H','K','C','C',0}
 
static const WCHAR long_hklm [] = {'H','K','E','Y','_','L','O','C','A','L','_','M','A','C','H','I','N','E',0}
 
static const WCHAR long_hkcu [] = {'H','K','E','Y','_','C','U','R','R','E','N','T','_','U','S','E','R',0}
 
static const WCHAR long_hkcr [] = {'H','K','E','Y','_','C','L','A','S','S','E','S','_','R','O','O','T',0}
 
static const WCHAR long_hku [] = {'H','K','E','Y','_','U','S','E','R','S',0}
 
static const WCHAR long_hkcc [] = {'H','K','E','Y','_','C','U','R','R','E','N','T','_','C','O','N','F','I','G',0}
 
struct {
   HKEY   key
 
   const WCHAR *   short_name
 
   const WCHAR *   long_name
 
root_rels []
 
static const WCHAR type_none [] = {'R','E','G','_','N','O','N','E',0}
 
static const WCHAR type_sz [] = {'R','E','G','_','S','Z',0}
 
static const WCHAR type_expand_sz [] = {'R','E','G','_','E','X','P','A','N','D','_','S','Z',0}
 
static const WCHAR type_binary [] = {'R','E','G','_','B','I','N','A','R','Y',0}
 
static const WCHAR type_dword [] = {'R','E','G','_','D','W','O','R','D',0}
 
static const WCHAR type_dword_le [] = {'R','E','G','_','D','W','O','R','D','_','L','I','T','T','L','E','_','E','N','D','I','A','N',0}
 
static const WCHAR type_dword_be [] = {'R','E','G','_','D','W','O','R','D','_','B','I','G','_','E','N','D','I','A','N',0}
 
static const WCHAR type_multi_sz [] = {'R','E','G','_','M','U','L','T','I','_','S','Z',0}
 
struct {
   DWORD   type
 
   const WCHAR *   name
 
type_rels []
 
static unsigned int num_values_found = 0
 

Macro Definition Documentation

#define MAX_SUBKEY_LEN   257

Definition at line 657 of file reg.c.

Referenced by query_all(), and query_value().

Enumeration Type Documentation

Enumerator
REG_ADD 
REG_DELETE 
REG_IMPORT 
REG_QUERY 
REG_INVALID 

Definition at line 911 of file reg.c.

911  {
912  REG_ADD,
913  REG_DELETE,
914  REG_IMPORT,
915  REG_QUERY,
917 };
Definition: reg.c:915
Definition: reg.c:912

Function Documentation

static BOOL ask_confirm ( unsigned int  msgid,
WCHAR reg_info 
)
static

Definition at line 183 of file reg.c.

Referenced by reg_add(), and reg_delete().

184 {
185  HMODULE hmod;
186  WCHAR Ybuffer[4];
187  WCHAR Nbuffer[4];
188  WCHAR defval[32];
189  WCHAR answer[MAX_PATH];
190  WCHAR *str;
191  DWORD count;
192 
193  hmod = GetModuleHandleW(NULL);
194  LoadStringW(hmod, STRING_YES, Ybuffer, ARRAY_SIZE(Ybuffer));
195  LoadStringW(hmod, STRING_NO, Nbuffer, ARRAY_SIZE(Nbuffer));
196  LoadStringW(hmod, STRING_DEFAULT_VALUE, defval, ARRAY_SIZE(defval));
197 
198  str = (reg_info && *reg_info) ? reg_info : defval;
199 
200  while (1)
201  {
202  output_message(msgid, str);
204  ReadConsoleW(GetStdHandle(STD_INPUT_HANDLE), answer, ARRAY_SIZE(answer), &count, NULL);
205  answer[0] = toupperW(answer[0]);
206  if (answer[0] == Ybuffer[0])
207  return TRUE;
208  if (answer[0] == Nbuffer[0])
209  return FALSE;
210  }
211 }
#define TRUE
Definition: types.h:120
#define STRING_NO
Definition: resource.h:42
__wchar_t WCHAR
Definition: xmlstorage.h:180
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
DWORD DWORD
Definition: winlogon.h:75
#define FALSE
Definition: types.h:117
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:557
#define STRING_YES
Definition: resource.h:41
#define STD_INPUT_HANDLE
Definition: winbase.h:262
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
Definition: console.c:137
#define ARRAY_SIZE(A)
Definition: reg.h:24
WINE_UNICODE_INLINE WCHAR toupperW(WCHAR ch)
Definition: unicode.h:141
BOOL WINAPI DECLSPEC_HOTPATCH ReadConsoleW(IN HANDLE hConsoleInput, OUT LPVOID lpBuffer, IN DWORD nNumberOfCharsToRead, OUT LPDWORD lpNumberOfCharsRead, IN PCONSOLE_READCONSOLE_CONTROL pInputControl OPTIONAL)
Definition: readwrite.c:1176
#define MAX_PATH
Definition: compat.h:26
GLuint GLuint GLsizei count
Definition: gl.h:1545
static PEXPLICIT_ACCESSW *static HMODULE hmod
Definition: security.c:145
#define STRING_DEFAULT_VALUE
Definition: resource.h:44
HANDLE HMODULE
Definition: typedefs.h:75
#define STRING_YESNO
Definition: resource.h:40
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:844
void __cdecl output_message(unsigned int id,...)
Definition: reg.c:158
static WCHAR* build_subkey_path ( WCHAR path,
DWORD  path_len,
WCHAR subkey_name,
DWORD  subkey_len 
)
static

Definition at line 644 of file reg.c.

Referenced by query_all(), and query_value().

645 {
646  WCHAR *subkey_path;
647  static const WCHAR fmt[] = {'%','s','\\','%','s',0};
648 
649  subkey_path = heap_xalloc((path_len + subkey_len + 2) * sizeof(WCHAR));
650  sprintfW(subkey_path, fmt, path, subkey_name);
651 
652  return subkey_path;
653 }
__wchar_t WCHAR
Definition: xmlstorage.h:180
Definition: services.c:311
#define sprintfW
Definition: unicode.h:58
static DWORD path_len
Definition: batch.c:31
void * heap_xalloc(size_t size)
Definition: reg.c:84
Definition: dsound.c:958
static WCHAR* get_long_key ( HKEY  root,
WCHAR path 
)
static

Definition at line 853 of file reg.c.

Referenced by parse_registry_key().

854 {
856  WCHAR *long_key;
857  WCHAR fmt[] = {'%','s','\\','%','s',0};
858 
859  for (i = 0; i < array_size; i++)
860  {
861  if (root == root_rels[i].key)
862  break;
863  }
864 
866 
867  if (!path)
868  {
869  long_key = heap_xalloc((len + 1) * sizeof(WCHAR));
870  strcpyW(long_key, root_rels[i].long_name);
871  return long_key;
872  }
873 
874  len += strlenW(path) + 1; /* add one for the backslash */
875  long_key = heap_xalloc((len + 1) * sizeof(WCHAR));
876  sprintfW(long_key, fmt, root_rels[i].long_name, path);
877  return long_key;
878 }
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORD DWORD
Definition: winlogon.h:75
static UINT array_size
Definition: msctf.c:51
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define ARRAY_SIZE(A)
Definition: reg.h:24
const WCHAR * long_name
Definition: reg.c:47
GLenum GLsizei len
Definition: glext.h:6722
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
Definition: services.c:311
#define sprintfW
Definition: unicode.h:58
void * heap_xalloc(size_t size)
Definition: reg.c:84
static const struct @2 root_rels[]
Definition: dsound.c:958
Definition: path.c:42
static enum operations get_operation ( const WCHAR str,
int op_help 
)
static

Definition at line 919 of file reg.c.

Referenced by wmain().

920 {
921  struct op_info { const WCHAR *op; int id; int help_id; };
922 
923  static const WCHAR add[] = {'a','d','d',0};
924  static const WCHAR delete[] = {'d','e','l','e','t','e',0};
925  static const WCHAR import[] = {'i','m','p','o','r','t',0};
926  static const WCHAR query[] = {'q','u','e','r','y',0};
927 
928  static const struct op_info op_array[] =
929  {
931  { delete, REG_DELETE, STRING_DELETE_USAGE },
932  { import, REG_IMPORT, STRING_IMPORT_USAGE },
934  { NULL, -1, 0 }
935  };
936 
937  const struct op_info *ptr;
938 
939  for (ptr = op_array; ptr->op; ptr++)
940  {
941  if (!lstrcmpiW(str, ptr->op))
942  {
943  *op_help = ptr->help_id;
944  return ptr->id;
945  }
946  }
947 
948  return REG_INVALID;
949 }
int add
Definition: i386-dis.c:3122
Definition: reg.c:915
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define STRING_QUERY_USAGE
Definition: resource.h:29
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
UINT op
Definition: effect.c:219
static PVOID ptr
Definition: dispmode.c:30
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:557
#define STRING_IMPORT_USAGE
Definition: resource.h:57
#define STRING_DELETE_USAGE
Definition: resource.h:28
GLenum GLuint id
Definition: glext.h:5579
Definition: reg.c:912
#define STRING_ADD_USAGE
Definition: resource.h:27
GLenum query
Definition: glext.h:7781
static LPBYTE get_regdata ( const WCHAR data,
DWORD  reg_type,
WCHAR  separator,
DWORD reg_count 
)
static

Definition at line 264 of file reg.c.

Referenced by reg_add().

265 {
266  static const WCHAR empty;
267  LPBYTE out_data = NULL;
268  *reg_count = 0;
269 
270  if (!data) data = &empty;
271 
272  switch (reg_type)
273  {
274  case REG_NONE:
275  case REG_SZ:
276  case REG_EXPAND_SZ:
277  {
278  *reg_count = (lstrlenW(data) + 1) * sizeof(WCHAR);
279  out_data = heap_xalloc(*reg_count);
280  lstrcpyW((LPWSTR)out_data,data);
281  break;
282  }
283  case REG_DWORD:
284  /* case REG_DWORD_LITTLE_ENDIAN: */
285  case REG_DWORD_BIG_ENDIAN: /* Yes, this is correct! */
286  {
287  LPWSTR rest;
288  unsigned long val;
289  val = wcstoul(data, &rest, (tolowerW(data[1]) == 'x') ? 16 : 10);
290  if (*rest || data[0] == '-' || (val == ~0u && errno == ERANGE)) {
292  break;
293  }
294  *reg_count = sizeof(DWORD);
295  out_data = heap_xalloc(*reg_count);
296  ((LPDWORD)out_data)[0] = val;
297  break;
298  }
299  case REG_BINARY:
300  {
301  BYTE hex0, hex1;
302  int i = 0, destByteIndex = 0, datalen = lstrlenW(data);
303  *reg_count = ((datalen + datalen % 2) / 2) * sizeof(BYTE);
304  out_data = heap_xalloc(*reg_count);
305  if(datalen % 2)
306  {
307  hex1 = hexchar_to_byte(data[i++]);
308  if(hex1 == 0xFF)
309  goto no_hex_data;
310  out_data[destByteIndex++] = hex1;
311  }
312  for(;i + 1 < datalen;i += 2)
313  {
314  hex0 = hexchar_to_byte(data[i]);
315  hex1 = hexchar_to_byte(data[i + 1]);
316  if(hex0 == 0xFF || hex1 == 0xFF)
317  goto no_hex_data;
318  out_data[destByteIndex++] = (hex0 << 4) | hex1;
319  }
320  break;
321  no_hex_data:
322  /* cleanup, print error */
323  heap_free(out_data);
325  out_data = NULL;
326  break;
327  }
328  case REG_MULTI_SZ:
329  {
330  int i, destindex, len = strlenW(data);
331  WCHAR *buffer = heap_xalloc((len + 2) * sizeof(WCHAR));
332 
333  for (i = 0, destindex = 0; i < len; i++, destindex++)
334  {
335  if (!separator && data[i] == '\\' && data[i + 1] == '0')
336  {
337  buffer[destindex] = 0;
338  i++;
339  }
340  else if (data[i] == separator)
341  buffer[destindex] = 0;
342  else
343  buffer[destindex] = data[i];
344 
345  if (destindex && !buffer[destindex - 1] && (!buffer[destindex] || destindex == 1))
346  {
347  heap_free(buffer);
349  return NULL;
350  }
351  }
352  buffer[destindex] = 0;
353  if (destindex && buffer[destindex - 1])
354  buffer[++destindex] = 0;
355  *reg_count = (destindex + 1) * sizeof(WCHAR);
356  return (BYTE *)buffer;
357  }
358  default:
360  }
361 
362  return out_data;
363 }
static const WCHAR separator[]
Definition: asmname.c:45
#define STRING_MISSING_HEXDATA
Definition: resource.h:37
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
#define REG_BINARY
Definition: nt_native.h:1496
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned char * LPBYTE
Definition: typedefs.h:52
BOOL heap_free(void *buf)
Definition: reg.c:113
GLuint buffer
Definition: glext.h:5915
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble * u
Definition: glfuncs.h:88
#define STRING_INVALID_STRING
Definition: resource.h:48
int errno
_Check_return_ unsigned long __cdecl wcstoul(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
int const JOCTET unsigned int datalen
Definition: jpeglib.h:1027
#define lstrlenW
Definition: compat.h:407
static BYTE hexchar_to_byte(WCHAR ch)
Definition: reg.c:252
static const WCHAR empty[]
Definition: task.c:29
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define REG_MULTI_SZ
Definition: nt_native.h:1501
smooth NULL
Definition: ftsmooth.c:557
#define STRING_MISSING_INTEGER
Definition: resource.h:36
GLuint GLfloat * val
Definition: glext.h:7180
#define LPDWORD
Definition: nt_native.h:46
WINE_UNICODE_INLINE WCHAR tolowerW(WCHAR ch)
Definition: unicode.h:135
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define ERANGE
Definition: acclib.h:92
GLenum GLsizei len
Definition: glext.h:6722
#define REG_DWORD
Definition: nt_native.h:1497
unsigned char BYTE
Definition: ntddk_ex.h:96
#define REG_DWORD_BIG_ENDIAN
Definition: nt_native.h:1499
#define STRING_UNHANDLED_TYPE
Definition: resource.h:38
#define lstrcpyW
Definition: compat.h:406
#define REG_EXPAND_SZ
Definition: nt_native.h:1494
void __cdecl output_message(unsigned int id,...)
Definition: reg.c:158
void * heap_xalloc(size_t size)
Definition: reg.c:84
#define REG_NONE
Definition: nt_native.h:1492
static ULONG ULONG *static const UNICODE_STRING void DWORD
Definition: reg.c:135
WCHAR * LPWSTR
Definition: xmlstorage.h:184
type_t * reg_type(type_t *type, const char *name, struct namespace *namespace, int t)
Definition: parser.tab.c:5874
#define REG_SZ
Definition: layer.c:22
BOOL heap_free ( void buf)

Definition at line 113 of file reg.c.

Referenced by _ItemizeInternal(), AboutProtocol_Release(), AboutProtocol_Start(), AboutProtocolFactory_CreateInstance(), ActiveScriptSite_Release(), add_cookie_headers(), add_host_header(), add_keyitem_pair(), add_property(), add_request_headers(), ADVAPI_IsLocalComputer(), alloc_array(), alloc_bool(), alloc_dirstack(), alloc_error(), alloc_ns_context(), alloc_number(), alloc_object(), alloc_regexp(), alloc_vbarray(), alloc_vbscode(), alpha_blend_pixels_hrgn(), APPINFO_Destroy(), APPINFO_SetOption(), Arguments_destructor(), Array_destructor(), array_join(), Array_sort(), array_to_args(), async_exec_query(), AsyncBindCtx_Release(), AsyncFtpCreateDirectoryProc(), AsyncFtpDeleteFileProc(), AsyncFtpFindFirstFileProc(), AsyncFtpGetFileProc(), AsyncFtpOpenFileProc(), AsyncFtpPutFileProc(), AsyncFtpRemoveDirectoryProc(), AsyncFtpRenameFileProc(), AsyncFtpSetCurrentDirectoryProc(), AsyncHttpSendRequestProc(), AsyncInstallDistributionUnit(), AsyncInternetOpenUrlProc(), AXSite_Release(), BIDI_DetermineLevels(), bind_event_scripts(), Binding_Release(), BindProtocol_Release(), BindStatusCallback_Release(), blit_gif_frame(), BPInternetProtocolSink_Switch(), BREAK_line(), brush_fill_pixels(), bsc_Release(), bstr_to_nsacstr(), build_header_request_string(), build_path(), build_proplist(), build_request_header(), build_request_string(), build_response_header(), cache_authorization(), cache_basic_authorization(), cache_container_delete_container(), cache_containers_add(), cache_file_available(), channelbsc_set_channel(), chunked_destroy(), ciffile_Release(), class_object_Release(), clear_dirstack(), clear_path(), clear_table(), Client_Release(), close_key(), close_output_buffer(), CloseCHM(), commit_cache_entry(), CommitUrlCacheEntryA(), CommitUrlCacheEntryW(), compile_select_statement(), compile_switch_statement(), component_free(), computeBracketPairs(), computeIsolatingRunsSet(), connect_destroy(), ConnectionPoint_Destroy(), ConnectionPointContainer_Destroy(), construct_function(), ContextualShape_Arabic(), ContextualShape_Bengali(), ContextualShape_Devanagari(), ContextualShape_Gujarati(), ContextualShape_Gurmukhi(), ContextualShape_Kannada(), ContextualShape_Khmer(), ContextualShape_Malayalam(), ContextualShape_Mongolian(), ContextualShape_Oriya(), ContextualShape_Phags_pa(), ContextualShape_Sinhala(), ContextualShape_Syriac(), ContextualShape_Tamil(), ContextualShape_Telugu(), convert_params(), ConvertStringSidToSidA(), create_class_object(), create_collection_from_htmlcol(), create_date(), create_dispex(), create_drive(), create_file(), create_filecoll(), create_folder(), create_foldercoll(), create_function(), create_instance_enum(), create_internet_session(), create_json(), create_match2(), create_math(), create_moniker(), create_netconn(), create_object(), create_path_gradient(), create_procedure_disp(), create_prop(), create_qualifier_enum(), create_record(), create_req_file(), create_shortcut(), create_signature(), create_signature_columns_and_data(), create_signature_table(), create_sub_matches(), create_textstream(), CreateUrlCacheEntryW(), CredDeleteA(), CredDeleteW(), CredEnumerateA(), CredEnumerateW(), CredFree(), CredIsMarshaledCredentialA(), CredMarshalCredentialA(), CredReadA(), CredReadDomainCredentialsA(), CredReadW(), CredUnmarshalCredentialA(), CredUnmarshalCredentialW(), CredWriteA(), CredWriteW(), CustomDoc_Release(), DataObjectImpl_Release(), date_parse(), dde_proc(), decode_frame_wic(), decode_html(), decode_image_gif(), decrease_state(), default_task_destr(), default_value_name_state(), delete_container(), delete_cookie(), delete_domain(), delete_element(), delete_header(), DeleteUrlCacheEntryW(), dependency_entry_free(), destroy_array(), destroy_authinfo(), destroy_record(), destroy_script(), destroy_undo_item(), destroy_view(), detach_thread(), dict_enum_Release(), dictionary_Release(), disp_call(), disp_call_value(), DispatchEx_InvokeEx(), DispatchEx_Release(), DispCallFunc(), DisplayPopupMenu(), DllMain(), do_authorization(), doc_navigate_task_destr(), DocHost_Release(), DOMClassFactory_Create(), DOMClassFactory_Release(), doWinMain(), download_script(), download_url(), DownloadBSC_Create(), DownloadBSC_Release(), downloadcb_create(), downloadcb_Release(), draw_cap(), draw_poly(), drive_Release(), drivecoll_enumvariant_Release(), drivecoll_Release(), editsvcs_Release(), elem_vector_normalize(), EmitREBytecode(), enum_class_object_Release(), enum_components_Release(), enum_groups_Release(), enum_key(), enum_values(), EnumConnections_Release(), EnumFORMATETC_Release(), EnumFormatImpl_Release(), EnumOLEVERB_Release(), EnumUnknown_Release(), enumvar_Release(), exec_fontname(), exec_source(), ExtractFilesW(), ExtServ_ImplSetAdditionalHeaders(), ExtServ_ImplSetAuthenticateData(), ExtServUnk_Release(), file_Release(), filecoll_enumvariant_Release(), filecoll_Release(), FileProtocol_Release(), filesys_GetFileVersion(), fill_datafile(), fill_directory(), fill_ip4routetable(), fill_networkadapter(), fill_networkadapterconfig(), fill_printer(), fill_service(), find_mime_from_url(), find_ne_resource(), FindCloseUrlCache(), FindContextAlias(), FindFirstUrlCacheEntryA(), FindFirstUrlCacheEntryW(), FindHTMLHelpSetting(), folder_Release(), foldercoll_enumvariant_Release(), foldercoll_Release(), format_string_callback(), free_accept_types(), free_async(), free_attr(), free_columns(), free_content_item(), free_cookie(), free_cookie_domain_list(), free_dirstack(), free_encoded_buffer(), free_fav_menu_data(), free_generic_string_formats(), free_global_proxy(), free_header(), free_http_headers(), free_image_data(), free_keyitem_pair(), free_keys(), free_netconn(), free_ns_context(), free_output_buffer(), free_parser_data(), free_path(), free_path_list(), free_prop(), free_query(), free_request(), free_row_values(), free_session(), free_table(), free_tls_list(), free_travellog_entry(), FreeProxyInfo(), FreeUrlCacheSpaceA(), FTP_FtpFindFirstFileW(), FTP_FtpGetCurrentDirectoryW(), FTP_FtpOpenFileW(), FTP_ParseDirectory(), FTP_ParseNextFile(), FTP_RetrieveFileData(), FTP_SendCommand(), FTP_SendCommandA(), FTP_SendData(), FtpCommandA(), FtpCommandW(), FtpCreateDirectoryA(), FtpDeleteFileA(), FTPFILE_Destroy(), FtpFindFirstFileA(), FTPFINDNEXT_Destroy(), FtpGetCurrentDirectoryA(), FtpGetFileA(), FtpOpenFileA(), FtpProtocol_Release(), FtpPutFileA(), FtpRemoveDirectoryA(), FtpRenameFileA(), FTPSESSION_Destroy(), FtpSetCurrentDirectoryA(), Function_apply(), Function_destructor(), Function_Release(), gdip_format_string(), GdipAddPathBeziersI(), GdipAddPathClosedCurve2(), GdipAddPathClosedCurve2I(), GdipAddPathCurve2(), GdipAddPathCurve2I(), GdipAddPathLine2I(), GdipAddPathPie(), GdipAddPathPolygonI(), GdipAddPathRectangle(), GdipAddPathRectangles(), GdipAddPathRectanglesI(), GdipAddPathString(), GdipBitmapLockBits(), GdipBitmapUnlockBits(), GdipCloneBitmapArea(), GdipCloneBrush(), GdipCloneCustomLineCap(), GdipCloneImage(), GdipCloneImageAttributes(), GdipClonePath(), GdipCloneStringFormat(), GdipCombineRegionPath(), GdipCombineRegionRect(), GdipCombineRegionRegion(), GdipCreateBitmapFromHBITMAP(), GdipCreateBitmapFromHICON(), GdipCreateBitmapFromScan0(), GdipCreateCachedBitmap(), GdipCreateCustomLineCap(), GdipCreateFromHDC2(), GdipCreateHICONFromBitmap(), GdipCreateLineBrush(), GdipCreateMetafileFromWmf(), GdipCreatePath2(), GdipCreatePath2I(), GdipCreatePen2(), GdipCreateRegionHrgn(), GdipCreateTextureIA(), GdipDeleteBrush(), GdipDeleteCachedBitmap(), GdipDeleteCustomLineCap(), GdipDeleteGraphics(), GdipDeleteMatrix(), GdipDeletePath(), GdipDeletePathIter(), GdipDeletePen(), GdipDeleteRegion(), GdipDeleteStringFormat(), GdipDisposeImage(), GdipDisposeImageAttributes(), GdipDrawBeziersI(), GdipDrawClosedCurve2I(), GdipDrawCurve2I(), GdipDrawCurveI(), GdipDrawImagePointsRect(), GdipDrawLinesI(), GdipDrawPolygonI(), GdipDrawRectanglesI(), GdipEnumerateMetafileSrcRectDestPoints(), GdipFillClosedCurve2I(), GdipFillRectanglesI(), GdipGetAllPropertyItems(), GdipGetClip(), GdipGetPathPointsI(), GdipGetRegionScans(), GdipGetRegionScansCount(), GdipGetRegionScansI(), GdipInitializePalette(), GdipMeasureDriverString(), GdipPlayMetafileRecord(), GdipRecordMetafile(), GdipReversePath(), GdipSetImageAttributesRemapTable(), GdipSetImagePalette(), GdipSetLineBlend(), GdipSetLinePresetBlend(), GdipSetPathGradientBlend(), GdipSetPathGradientPresetBlend(), GdipSetPathGradientSurroundColorsWithCount(), GdipSetPenDashArray(), GdipSetPenDashStyle(), GdipSetStringFormatMeasurableCharacterRanges(), GdipTransformMatrixPointsI(), GdipTransformPointsI(), GdipVectorTransformMatrixPointsI(), generate_moniker(), get_attr(), get_binaryrepresentation(), get_channel_http_header(), get_computer_name(), get_cookie_container(), get_cookie_domain(), get_cookie_header(), get_defaultipgateway(), get_dispids(), get_dnsserversearchorder(), get_elem_source_index(), get_file_version(), get_gif_frame_property(), get_gif_loopcount(), get_lineA(), get_lineW(), get_local_server_stream(), get_logical_processor_count(), get_mime_clsid(), get_processor_currentclockspeed(), get_processor_maxclockspeed(), get_property(), get_protocol_cf(), get_redirect_url(), get_regdata(), get_run_glyph_buffers(), get_server(), get_uri_string(), get_url(), GetChmString(), GetUrlCacheEntryInfoExW(), gif_metadata_reader(), GlobalOptions_Release(), GopherProtocol_Release(), graphics_from_image(), group_free(), handle_redirect(), header_state(), heap_pool_clear(), heap_pool_free(), heap_string_free(), HH_AddToolbar(), HlinkCreateFromString(), Host_Echo(), HTMLAttributeCollection_Release(), HTMLBodyElement_Create(), HTMLCurrentStyle_Release(), HTMLDocument3_getElementsByName(), HTMLDocumentNode_destructor(), HTMLDOMAttribute_Release(), HTMLDOMChildrenCollection_Release(), HTMLDOMChildrenCollectionEnum_Release(), HTMLDOMImplementation_Release(), HTMLDOMNode_delete_cycle_collectable(), HTMLElement_destructor(), HTMLElementCollection_item(), HTMLElementCollection_Release(), HTMLElementCollectionEnum_Release(), HTMLEventObj_Release(), HTMLFiltersCollection_Release(), HtmlHelpA(), HtmlHelpW(), HTMLImageElementFactory_Release(), HtmlLoadOptions_Release(), HtmlLoadOptions_SetOption(), HTMLLocation_Release(), HTMLMimeTypesCollection_Release(), HTMLOptionElementFactory_Release(), HTMLOuterWindow_Create(), HTMLPluginsCollection_Release(), HTMLRect_Release(), HTMLScreen_Release(), HTMLSelectionObject_Release(), HTMLStorage_Release(), HTMLStyle_put_backgroundPositionX(), HTMLStyle_put_backgroundPositionY(), HTMLStyle_put_filter(), HTMLStyle_Release(), HTMLStyle_removeAttribute(), HTMLStyleSheet_Release(), HTMLStyleSheetRulesCollection_Release(), HTMLStyleSheetsCollection_Release(), HTMLTxtRange_Release(), HTMLWindow2_alert(), HTMLXMLHttpRequest_getResponseHeader(), HTMLXMLHttpRequest_Release(), HTMLXMLHttpRequestFactory_Release(), HTTP_DealWithProxy(), HTTP_DeleteCustomHeader(), HTTP_DoAuthorization(), HTTP_FixURL(), HTTP_FreeTokens(), HTTP_GetResponseHeaders(), HTTP_HandleRedirect(), HTTP_HttpAddRequestHeadersW(), HTTP_HttpEndRequestW(), HTTP_HttpQueryInfoW(), HTTP_HttpSendRequestW(), HTTP_InsertAuthorization(), HTTP_InsertCookies(), HTTP_ProcessCookies(), HttpAddRequestHeadersA(), HttpOpenRequestA(), HttpProtocol_close_connection(), HttpProtocol_Release(), HttpProtocol_start_downloading(), HttpQueryInfoA(), HTTPREQ_Destroy(), HTTPREQ_QueryOption(), HTTPREQ_SetOption(), HttpSendRequestA(), HttpSendRequestExA(), HTTPSESSION_Destroy(), HTTPSESSION_SetOption(), ICreateErrorInfoImpl_SetDescription(), ICreateErrorInfoImpl_SetHelpFile(), ICreateErrorInfoImpl_SetSource(), ICreateTypeInfo2_fnAddFuncDesc(), ICreateTypeInfo2_fnSetTypeDescAlias(), ICreateTypeLib2_fnSaveAllChanges(), IErrorInfoImpl_Release(), IEWinMain(), IHlink_fnRelease(), IHlink_fnSetFriendlyName(), IHlink_fnSetMonikerReference(), IHlink_fnSetStringReference(), IHlink_fnSetTargetFrameName(), IHlinkBC_fnRelease(), IHlinkBC_SetBrowseWindowInfo(), inf_free(), inf_section_free(), inf_value_free(), init_container(), init_members(), init_script_cache(), InPlaceFrame_Release(), InPlaceUIWindow_Release(), install_from_registered_dir(), install_from_unix_file(), install_wine_gecko(), InstallCallback_Release(), InstallEngine_Release(), InstallEngine_SetBaseUrl(), InstallEngine_SetDownloadDir(), InstanceObjectFactory_IClassFactory_Release(), INTERNET_AllocThreadError(), INTERNET_AsyncCall(), INTERNET_InternetOpenUrlW(), INTERNET_LoadProxySettings(), INTERNET_SendCallback(), internet_status_callback(), INTERNET_WorkerThreadFunc(), InternetCheckConnectionA(), InternetCheckConnectionW(), InternetConnectA(), InternetCrackUrlA(), InternetCrackUrlW(), InternetCreateUrlA(), InternetExplorer_Release(), InternetGetConnectedStateExA(), InternetGetCookieExA(), InternetGetCookieExW(), InternetGetSecurityInfoByURLA(), InternetOpenA(), InternetOpenUrlA(), InternetProtocolSink_ReportProgress(), InternetSession_UnregisterMimeFilter(), InternetSetCookieA(), InternetSetCookieExA(), InternetSetOptionA(), InternetSetOptionW(), InternetTimeToSystemTimeA(), interp_pop_except(), invoke_disp_value(), IOleClientSite_fnRelease(), IRichEditOleImpl_inner_fnRelease(), is_gecko_path(), is_supported_doc_mime(), IsUrlCacheEntryExpiredW(), itemize_para(), ITextRange_fnRelease(), ITextSelection_fnRelease(), ITypeInfo_fnAddressOfMember(), ITypeInfo_fnInvoke(), ITypeInfo_fnRelease(), ITypeInfo_fnReleaseTypeAttr(), ITypeInfoImpl_Destroy(), ITypeLib2_Constructor_MSFT(), ITypeLib2_Constructor_SLTG(), ITypeLib2_fnRelease(), ITypeLib2_fnReleaseTLibAttr(), JSCaller_Release(), JScript_AddNamedItem(), JScript_Release(), JScriptParse_InitNew(), jsdisp_free(), JSON_stringify(), jsstr_free(), jsval_release(), jsval_variant(), keylist_Release(), layout_row(), lengthen_path(), load_emf(), load_persistent_cookie(), load_wmf(), LoadWinTypeFromCHM(), locator_Release(), LookupCleanup(), mark_invalid_combinations(), Match2_Release(), MatchCollection2_Release(), MatchCollectionEnum_Release(), ME_CallWordBreakProc(), ME_DestroyDisplayItem(), ME_DestroyString(), ME_EndToUnicode(), ME_GetTextEx(), ME_MakeStringEmpty(), ME_RTFSpecialCharHook(), METAFILE_AllocateRecord(), METAFILE_GraphicsDeleted(), mime_available(), MimeFilterProtocol_Release(), MimeHtmlProtocol_Release(), MimeHtmlProtocol_Start(), MimeOleObjectFromMoniker(), MkProtocol_Release(), MkProtocol_StartEx(), MonikerProp_PutProperty(), move_bitmap(), MSFT_DoFuncs(), MSFT_ReadAllNames(), MSFT_ReadAllStrings(), MSFT_ReadValue(), MXAttributes_Release(), MXNamespaceManager_create(), MXWriter_create(), mxwriter_Release(), mxwriter_write_attribute(), navigate_bsc_task_destr(), navigate_fragment(), navigate_javascript_task_destr(), navigate_task_destr(), NavigateToUrl(), NETCON_recv(), netcon_secure_connect_setup(), netconn_close(), netconn_create(), netconn_recv(), netconn_secure_connect(), NP_CreateTab(), nsAsyncVerifyRedirectCallback_Release(), nsChannel_AsyncOpen(), nsChannel_Release(), nsChannel_SetContentCharset(), nsChannel_SetContentType(), nsChannelBSC_destroy(), nsChannelBSC_on_progress(), nsChannelBSC_on_response(), nsInputStream_Release(), nsProtocolHandler_Release(), nsRunnable_Release(), nsSingletonEnumerator_Release(), nsUploadChannel_SetUploadStream(), nsURI_GetHostPort(), nsURI_Release(), nsURI_Resolve(), nsURI_SetHost(), nsURI_SetPassword(), nsURI_SetPath(), nsURI_SetScheme(), nsURI_SetSpec(), nsURI_SetUsername(), nsURI_SetUserPass(), nsURL_GetRef(), nsURL_SetQuery(), nsURL_SetRef(), nsWeakReference_Release(), nsWebBrowserChrome_Release(), object_available_task_destr(), Object_destructor(), object_Release(), objectset_Release(), OleUndoManager_Release(), OmHistory_Release(), OmNavigator_Release(), on_progress_proc(), open_connection(), OpenCHM(), OpenURL(), output_value(), output_writeconsole(), parse_attr(), parse_content_type(), parse_cookie(), parse_event_elem(), parse_extern_script(), parse_header(), parse_hhindex(), parse_json_string(), parse_json_value(), parse_obj_node_param(), parse_path(), parse_proxy_url(), parse_resource(), parseError_Release(), parser_release(), ParseRegExp(), ParseStringSecurityDescriptorToSecurityDescriptor(), path_GetText(), path_Release(), path_RemoveAllNamespaces(), path_RemoveNamespaceAt(), path_SetClassName(), path_SetNamespaceAt(), path_SetServer(), PersistFile_Save(), PersistHistory_LoadHistory(), PersistStreamInit_Save(), PHClientSite_Release(), PHEventSink_Release(), png_metadata_reader(), pop_call_frame(), prepare_hex_string_data(), preprocess_dispex_data(), print_string(), process_component(), process_hook_section(), process_inf(), process_section(), property_Release(), PropertyBag_Release(), propertyset_Release(), ProtocolHandler_Continue(), ProtocolHandler_Read(), ProtocolSinkHandler_ReportData(), ProtocolStream_Release(), push_task(), qualifier_set_Release(), query_all(), query_auth_schemes(), query_global_option(), query_headers(), query_http_info(), query_service_config(), query_value(), quoted_value_name_state(), read_dependencies(), read_element(), read_hlink_string(), read_platform_entry(), read_post_data_stream(), read_reply(), read_ssl_chunk(), read_urls(), read_version_entry(), ReadChmSystem(), ready_state_task_destr(), refresh_destr(), reg_add(), reg_delete(), reg_import(), RegExp2_Execute(), RegExp2_put_Pattern(), RegExp2_Release(), regexp_destroy(), RegExp_destructor(), regexp_match(), regexp_match_next(), regexp_string_match(), registry_credential_matches_filter(), RegistryPropertyBag_IPropertyBag_Read(), RegistryPropertyBag_IPropertyBag_Release(), release_bytecode(), release_cc(), release_compiler(), release_dispex(), release_event_target(), release_exec(), release_host(), release_inner_window(), release_install_ctx(), release_listener(), release_outer_window(), release_request_data(), release_script(), release_script_hosts(), release_task_timer(), release_typelib(), release_vbscode(), ReleaseHelpViewer(), ReleaseIndex(), ReleaseSearch(), rep_call(), report_data_proc(), report_result_proc(), req_file_release(), request_destroy(), request_get_codepage(), request_receive(), request_send(), request_set_option(), requires_fallback(), reset_request(), resolve_hostname(), resolveNeutrals(), ResProtocol_Release(), ResProtocol_Start(), ResProtocolFactory_CreateInstance(), retrieve_cached_authorization(), RetrieveUrlCacheEntryFileW(), RetrieveUrlCacheEntryStreamW(), return_wstr_nsacstr(), RTFDestroy(), RTFDestroyAttrs(), RTFFlushCPOutputBuffer(), run_insert_comment(), run_insert_script(), run_script(), run_winemenubuilder(), save_persistent_cookie(), SAXContentHandler_characters(), scope_release(), script_parse_event(), script_release(), ScriptBSC_destroy(), ScriptBSC_stop_binding(), ScriptDisp_Release(), ScriptFreeCache(), ScriptLayout(), ScriptPlace(), ScriptShape(), ScriptShapeOpenType(), ScriptStringAnalyse(), ScriptStringFree(), ScriptTextOut(), SearchCHM_File(), section_get_dword(), secure_proxy_connect(), security_on_destroy(), security_Release(), seed_dirs(), select_frame_wic(), send_request(), server_release(), services_Release(), session_destroy(), set_channel_http_header(), set_cookies(), set_credentials(), set_dochost_url(), set_downloading_task_destr(), set_environment(), set_http_header(), set_nsstyle_attr(), set_server_for_hostname(), setup_arguments_object(), SetUrlCacheEntryInfoW(), SHAPE_does_GSUB_feature_apply_to_chars(), shape_run(), ShapeCharGlyphProp_Arabic(), ShapeCharGlyphProp_BaseIndic(), ShellBrowser_Release(), ShellUIHelper2_Release(), show_msgbox(), SHRestricted2A(), Site_Release(), SLTG_DoRefs(), SLTG_ProcessAlias(), SLTG_ProcessCoClass(), SLTG_ProcessDispatch(), SLTG_ProcessInterface(), SLTG_ProcessModule(), SOFTWARE_GdipDrawDriverString(), SOFTWARE_GdipDrawThinPath(), SOFTWARE_GdipFillRegion(), start_binding_task_destr(), start_doc_binding_task_destr(), StartLinkProcessor(), status_code_Release(), stgmed_file_release(), StgMedUnk_Release(), stop_request_task_destr(), strbuf_free(), stream_Release(), string_alloc(), String_concat(), String_destructor(), String_replace(), SubMatches_Release(), switch_proc(), task_proc(), task_send_request(), TextFont_Release(), TextPara_Release(), textstream_read(), textstream_Release(), textstream_writestr(), TLB_append_str(), TLB_FreeCustData(), TLB_Mapping_Release(), TLB_NEFile_Release(), TLB_PEFile_Release(), TLB_ReadTypeLib(), to_array(), transform_region_element(), UniformResourceLocatorA_InvokeCommand(), Unknown_Release(), UnlockUrlCacheEntryFileW(), UnlockUrlCacheEntryStream(), unregister_namespace(), unwind_exception(), url_entry_free(), urlcache_decode_url(), urlcache_encode_url(), urlcache_encode_url_alloc(), URLDownloadToCacheFileA(), URLDownloadToFileA(), UrlMkSetSessionOption(), URLMoniker_Load(), URLMoniker_Release(), URLOpenBlockingStreamA(), URLOpenStreamA(), value_get_dword_field(), value_get_str_field(), VBArray_destructor(), VBArray_getItem(), vbnamespacemanager_Release(), VBScript_AddNamedItem(), VBScript_Release(), visit_http_headers(), wbem_locator_ConnectServer(), wbem_locator_Release(), wbem_services_ExecMethod(), wbem_services_ExecNotificationQueryAsync(), wbem_services_ExecQueryAsync(), wbem_services_Release(), WbemQualifierSet_create(), WebBrowser_Release(), widen_dashed_figure(), Window_Release(), winhttp_request_get_ResponseStream(), winhttp_request_Open(), winhttp_request_Release(), winhttp_request_SetProxy(), winhttp_request_SetRequestHeader(), WinHttpCrackUrl(), WinHttpDetectAutoProxyConfigUrl(), WinHttpGetDefaultProxyConfiguration(), WinHttpGetIEProxyConfigForCurrentUser(), WinHttpGetProxyForUrl(), WinHttpSetDefaultProxyConfiguration(), WININET_Release(), WININET_SetAuthorization(), wintype_stringsA_free(), wintype_stringsW_free(), WMProfileManager_Release(), WMReader_Release(), WMSFT_compile_names(), WMSFT_compile_strings(), WMWriter_Release(), wrapper_Release(), write_credential_blob(), write_output_buffer(), wstrbuf_finish(), XMLHttpReqEventListener_Release(), xmlparser_Release(), xslprocessor_addParameter(), xslprocessor_par_free(), xslprocessor_Release(), and xsltemplate_Release().

114 {
115  return HeapFree(GetProcessHeap(), 0, buf);
116 }
#define GetProcessHeap()
Definition: compat.h:395
#define HeapFree(x, y, z)
Definition: compat.h:394
void* heap_xalloc ( size_t  size)

Definition at line 84 of file reg.c.

Referenced by build_subkey_path(), dword_data_state(), get_lineA(), get_lineW(), get_long_key(), get_regdata(), GetWideString(), GetWideStringN(), header_state(), open_key(), output_writeconsole(), query_all(), query_value(), quoted_value_name_state(), reg_data_to_wchar(), and reg_delete().

85 {
86  void *buf = HeapAlloc(GetProcessHeap(), 0, size);
87  if (!buf)
88  {
89  ERR("Out of memory!\n");
90  exit(1);
91  }
92  return buf;
93 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define exit(n)
Definition: config.h:202
#define ERR(fmt,...)
Definition: debug.h:109
GLsizeiptr size
Definition: glext.h:5919
void* heap_xrealloc ( void buf,
size_t  size 
)

Definition at line 95 of file reg.c.

Referenced by convert_hex_csv_to_hex(), get_lineA(), get_lineW(), query_all(), query_value(), and reg_delete().

96 {
97  void *new_buf;
98 
99  if (buf)
100  new_buf = HeapReAlloc(GetProcessHeap(), 0, buf, size);
101  else
102  new_buf = HeapAlloc(GetProcessHeap(), 0, size);
103 
104  if (!new_buf)
105  {
106  ERR("Out of memory!\n");
107  exit(1);
108  }
109 
110  return new_buf;
111 }
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define exit(n)
Definition: config.h:202
#define ERR(fmt,...)
Definition: debug.h:109
GLsizeiptr size
Definition: glext.h:5919
#define HeapReAlloc
Definition: compat.h:393
static BYTE hexchar_to_byte ( WCHAR  ch)
inlinestatic

Definition at line 252 of file reg.c.

Referenced by get_regdata().

253 {
254  if (ch >= '0' && ch <= '9')
255  return ch - '0';
256  else if (ch >= 'a' && ch <= 'f')
257  return ch - 'a' + 10;
258  else if (ch >= 'A' && ch <= 'F')
259  return ch - 'A' + 10;
260  else
261  return -1;
262 }
static BOOL is_help_switch ( const WCHAR s)
static

Definition at line 900 of file reg.c.

Referenced by wmain().

901 {
902  if (strlenW(s) > 2)
903  return FALSE;
904 
905  if ((s[0] == '/' || s[0] == '-') && (s[1] == 'h' || s[1] == '?'))
906  return TRUE;
907 
908  return FALSE;
909 }
#define TRUE
Definition: types.h:120
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
#define FALSE
Definition: types.h:117
GLdouble s
Definition: gl.h:2039
static void output_formatstring ( const WCHAR fmt,
__ms_va_list  va_args 
)
static

Definition at line 141 of file reg.c.

Referenced by output_message(), and output_string().

142 {
143  WCHAR *str;
144  DWORD len;
145 
148  fmt, 0, 0, (WCHAR *)&str, 0, &va_args);
149  if (len == 0 && GetLastError() != NO_ERROR)
150  {
151  WINE_FIXME("Could not format string: le=%u, fmt=%s\n", GetLastError(), wine_dbgstr_w(fmt));
152  return;
153  }
154  output_writeconsole(str, len);
155  LocalFree(str);
156 }
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define FORMAT_MESSAGE_FROM_STRING
Definition: winbase.h:393
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1056
DWORD WINAPI FormatMessageW(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, __ms_va_list *args)
Definition: format_msg.c:548
#define NO_ERROR
Definition: dderror.h:5
DWORD DWORD
Definition: winlogon.h:75
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
Definition: winbase.h:391
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: CString.cpp:62
const WCHAR * str
#define SetLastError(x)
Definition: compat.h:409
static void output_writeconsole(const WCHAR *str, DWORD wlen)
Definition: reg.c:118
GLenum GLsizei len
Definition: glext.h:6722
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
Definition: dsound.c:958
#define WINE_FIXME
Definition: debug.h:363
void __cdecl output_message ( unsigned int  id,
  ... 
)

Definition at line 158 of file reg.c.

Referenced by ask_confirm(), get_regdata(), key_name_state(), parse_registry_key(), parse_win31_line_state(), query_value(), reg_add(), reg_delete(), reg_import(), reg_query(), sane_path(), unescape_string(), and wmain().

159 {
160  WCHAR fmt[1024];
161  __ms_va_list va_args;
162 
163  if (!LoadStringW(GetModuleHandleW(NULL), id, fmt, ARRAY_SIZE(fmt)))
164  {
165  WINE_FIXME("LoadString failed with %d\n", GetLastError());
166  return;
167  }
168  __ms_va_start(va_args, id);
169  output_formatstring(fmt, va_args);
170  __ms_va_end(va_args);
171 }
static const char __ms_va_list
Definition: printf.c:70
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1056
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
smooth NULL
Definition: ftsmooth.c:557
#define ARRAY_SIZE(A)
Definition: reg.h:24
static void output_formatstring(const WCHAR *fmt, __ms_va_list va_args)
Definition: reg.c:141
#define __ms_va_end(list)
Definition: windef.h:471
#define __ms_va_start(list, arg)
Definition: windef.h:470
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:844
Definition: dsound.c:958
#define WINE_FIXME
Definition: debug.h:363
static void __cdecl output_string ( const WCHAR fmt,
  ... 
)
static

Definition at line 173 of file reg.c.

Referenced by output_value(), query_all(), query_value(), and reg_query().

174 {
175  __ms_va_list va_args;
176 
177  __ms_va_start(va_args, fmt);
178  output_formatstring(fmt, va_args);
179  __ms_va_end(va_args);
180 }
static const char __ms_va_list
Definition: printf.c:70
static void output_formatstring(const WCHAR *fmt, __ms_va_list va_args)
Definition: reg.c:141
#define __ms_va_end(list)
Definition: windef.h:471
#define __ms_va_start(list, arg)
Definition: windef.h:470
Definition: dsound.c:958
static void output_value ( const WCHAR value_name,
DWORD  type,
BYTE data,
DWORD  data_size 
)
static

Definition at line 614 of file reg.c.

Referenced by query_all(), and query_value().

615 {
616  static const WCHAR fmt[] = {' ',' ',' ',' ','%','1',0};
617  static const WCHAR newlineW[] = {'\n',0};
618  WCHAR defval[32];
619  WCHAR *reg_data;
620 
621  if (value_name && value_name[0])
622  output_string(fmt, value_name);
623  else
624  {
626  output_string(fmt, defval);
627  }
629 
630  if (data)
631  {
632  reg_data = reg_data_to_wchar(type, data, data_size);
633  output_string(fmt, reg_data);
634  heap_free(reg_data);
635  }
636  else
637  {
639  output_string(fmt, defval);
640  }
641  output_string(newlineW);
642 }
#define STRING_VALUE_NOT_SET
Definition: resource.h:56
__wchar_t WCHAR
Definition: xmlstorage.h:180
BOOL heap_free(void *buf)
Definition: reg.c:113
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
smooth NULL
Definition: ftsmooth.c:557
#define ARRAY_SIZE(A)
Definition: reg.h:24
static WCHAR * reg_data_to_wchar(DWORD type, const BYTE *src, DWORD size_bytes)
Definition: reg.c:532
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static void __cdecl output_string(const WCHAR *fmt,...)
Definition: reg.c:173
#define STRING_DEFAULT_VALUE
Definition: resource.h:44
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:844
Definition: dsound.c:958
static const WCHAR * reg_type_to_wchar(DWORD type)
Definition: reg.c:602
static void output_writeconsole ( const WCHAR str,
DWORD  wlen 
)
static

Definition at line 118 of file reg.c.

Referenced by output_formatstring().

119 {
120  DWORD count, ret;
121 
122  ret = WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), str, wlen, &count, NULL);
123  if (!ret)
124  {
125  DWORD len;
126  char *msgA;
127 
128  /* On Windows WriteConsoleW() fails if the output is redirected. So fall
129  * back to WriteFile(), assuming the console encoding is still the right
130  * one in that case.
131  */
132  len = WideCharToMultiByte(GetConsoleOutputCP(), 0, str, wlen, NULL, 0, NULL, NULL);
133  msgA = heap_xalloc(len);
134 
135  WideCharToMultiByte(GetConsoleOutputCP(), 0, str, wlen, msgA, len, NULL, NULL);
136  WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), msgA, len, &count, FALSE);
137  heap_free(msgA);
138  }
139 }
#define WideCharToMultiByte
Definition: compat.h:101
BOOL WINAPI DECLSPEC_HOTPATCH WriteConsoleW(IN HANDLE hConsoleOutput, IN CONST VOID *lpBuffer, IN DWORD nNumberOfCharsToWrite, OUT LPDWORD lpNumberOfCharsWritten, LPVOID lpReserved)
Definition: readwrite.c:1449
BOOL heap_free(void *buf)
Definition: reg.c:113
DWORD DWORD
Definition: winlogon.h:75
#define FALSE
Definition: types.h:117
UINT WINAPI DECLSPEC_HOTPATCH GetConsoleOutputCP(VOID)
Definition: console.c:2453
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:557
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
Definition: console.c:137
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
GLuint GLuint GLsizei count
Definition: gl.h:1545
int ret
GLenum GLsizei len
Definition: glext.h:6722
#define STD_OUTPUT_HANDLE
Definition: winbase.h:263
void * heap_xalloc(size_t size)
Definition: reg.c:84
static BOOL parse_registry_key ( const WCHAR key,
HKEY root,
WCHAR **  path,
WCHAR **  long_key 
)
static

Definition at line 880 of file reg.c.

Referenced by wmain().

881 {
882  if (!sane_path(key))
883  return FALSE;
884 
886  if (!*root)
887  {
889  return FALSE;
890  }
891 
892  *path = strchrW(key, '\\');
893  if (*path) (*path)++;
894 
895  *long_key = get_long_key(*root, *path);
896 
897  return TRUE;
898 }
#define TRUE
Definition: types.h:120
WINE_UNICODE_INLINE WCHAR * strchrW(const WCHAR *str, WCHAR ch)
Definition: unicode.h:248
static WCHAR * get_long_key(HKEY root, WCHAR *path)
Definition: reg.c:853
#define FALSE
Definition: types.h:117
#define STRING_INVALID_KEY
Definition: resource.h:31
static BOOL sane_path(const WCHAR *key)
Definition: reg.c:365
Definition: services.c:311
HKEY path_get_rootkey(const WCHAR *path)
Definition: reg.c:221
void __cdecl output_message(unsigned int id,...)
Definition: reg.c:158
Definition: path.c:42
HKEY path_get_rootkey ( const WCHAR path)

Definition at line 221 of file reg.c.

Referenced by parse_key_name(), and parse_registry_key().

222 {
223  DWORD i;
224 
225  for (i = 0; i < ARRAY_SIZE(root_rels); i++)
226  {
229  return root_rels[i].key;
230  }
231 
232  return NULL;
233 }
DWORD DWORD
Definition: winlogon.h:75
GLenum GLclampf GLint i
Definition: glfuncs.h:14
smooth NULL
Definition: ftsmooth.c:557
#define ARRAY_SIZE(A)
Definition: reg.h:24
static BOOL path_rootname_cmp(const WCHAR *input_path, const WCHAR *rootkey_name)
Definition: reg.c:213
const WCHAR * short_name
Definition: reg.c:46
const WCHAR * long_name
Definition: reg.c:47
Definition: services.c:311
static const struct @2 root_rels[]
Definition: path.c:42
static BOOL path_rootname_cmp ( const WCHAR input_path,
const WCHAR rootkey_name 
)
inlinestatic

Definition at line 213 of file reg.c.

Referenced by path_get_rootkey().

214 {
215  DWORD length = strlenW(rootkey_name);
216 
217  return (!strncmpiW(input_path, rootkey_name, length) &&
218  (input_path[length] == 0 || input_path[length] == '\\'));
219 }
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
#define strncmpiW(s1, s2, n)
Definition: unicode.h:40
DWORD DWORD
Definition: winlogon.h:75
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
static int query_all ( HKEY  key,
WCHAR path,
BOOL  recurse 
)
static

Definition at line 737 of file reg.c.

Referenced by reg_query().

738 {
739  LONG rc;
740  DWORD max_value_len = 256, value_len;
741  DWORD max_data_bytes = 2048, data_size;
742  DWORD subkey_len;
743  DWORD i, type, path_len;
744  WCHAR fmt[] = {'%','1','\n',0};
745  WCHAR fmt_path[] = {'%','1','\\','%','2','\n',0};
746  WCHAR *value_name, *subkey_name, *subkey_path;
747  WCHAR newlineW[] = {'\n',0};
748  BYTE *data;
749  HKEY subkey;
750 
751  output_string(fmt, path);
752 
753  value_name = heap_xalloc(max_value_len * sizeof(WCHAR));
754  data = heap_xalloc(max_data_bytes);
755 
756  i = 0;
757  for (;;)
758  {
759  value_len = max_value_len;
760  data_size = max_data_bytes;
761  rc = RegEnumValueW(key, i, value_name, &value_len, NULL, &type, data, &data_size);
762  if (rc == ERROR_SUCCESS)
763  {
764  output_value(value_name, type, data, data_size);
765  i++;
766  }
767  else if (rc == ERROR_MORE_DATA)
768  {
769  if (data_size > max_data_bytes)
770  {
771  max_data_bytes = data_size;
772  data = heap_xrealloc(data, max_data_bytes);
773  }
774  else
775  {
776  max_value_len *= 2;
777  value_name = heap_xrealloc(value_name, max_value_len * sizeof(WCHAR));
778  }
779  }
780  else break;
781  }
782 
783  heap_free(data);
784  heap_free(value_name);
785 
786  if (i || recurse)
787  output_string(newlineW);
788 
789  subkey_name = heap_xalloc(MAX_SUBKEY_LEN * sizeof(WCHAR));
790 
791  path_len = strlenW(path);
792 
793  i = 0;
794  for (;;)
795  {
796  subkey_len = MAX_SUBKEY_LEN;
797  rc = RegEnumKeyExW(key, i, subkey_name, &subkey_len, NULL, NULL, NULL, NULL);
798  if (rc == ERROR_SUCCESS)
799  {
800  if (recurse)
801  {
802  subkey_path = build_subkey_path(path, path_len, subkey_name, subkey_len);
803  if (!RegOpenKeyExW(key, subkey_name, 0, KEY_READ, &subkey))
804  {
805  query_all(subkey, subkey_path, recurse);
806  RegCloseKey(subkey);
807  }
808  heap_free(subkey_path);
809  }
810  else output_string(fmt_path, path, subkey_name);
811  i++;
812  }
813  else break;
814  }
815 
816  heap_free(subkey_name);
817 
818  if (i && !recurse)
819  output_string(newlineW);
820 
821  return 0;
822 }
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
#define ERROR_SUCCESS
Definition: deptool.c:10
#define MAX_SUBKEY_LEN
Definition: reg.c:657
#define KEY_READ
Definition: nt_native.h:1023
static WCHAR * build_subkey_path(WCHAR *path, DWORD path_len, WCHAR *subkey_name, DWORD subkey_len)
Definition: reg.c:644
__wchar_t WCHAR
Definition: xmlstorage.h:180
BOOL heap_free(void *buf)
Definition: reg.c:113
DWORD DWORD
Definition: winlogon.h:75
GLenum GLclampf GLint i
Definition: glfuncs.h:14
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
long LONG
Definition: pedump.c:60
LONG WINAPI RegEnumValueW(_In_ HKEY hKey, _In_ DWORD index, _Out_ LPWSTR value, _Inout_ PDWORD val_count, _Reserved_ PDWORD reserved, _Out_opt_ PDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ PDWORD count)
Definition: reg.c:2867
smooth NULL
Definition: ftsmooth.c:557
HANDLE HKEY
Definition: registry.h:24
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
void * heap_xrealloc(void *buf, size_t size)
Definition: reg.c:95
static void output_value(const WCHAR *value_name, DWORD type, BYTE *data, DWORD data_size)
Definition: reg.c:614
#define ERROR_MORE_DATA
Definition: dderror.h:13
static void __cdecl output_string(const WCHAR *fmt,...)
Definition: reg.c:173
unsigned char BYTE
Definition: ntddk_ex.h:96
Definition: services.c:311
static DWORD path_len
Definition: batch.c:31
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3381
void * heap_xalloc(size_t size)
Definition: reg.c:84
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
Definition: reg.c:2541
static int query_all(HKEY key, WCHAR *path, BOOL recurse)
Definition: reg.c:737
Definition: dsound.c:958
Definition: path.c:42
DWORD type
Definition: reg.c:69
static int query_value ( HKEY  key,
WCHAR value_name,
WCHAR path,
BOOL  recurse 
)
static

Definition at line 659 of file reg.c.

Referenced by reg_query().

660 {
661  LONG rc;
662  DWORD max_data_bytes = 2048, data_size;
663  DWORD subkey_len;
664  DWORD type, path_len, i;
665  BYTE *data;
666  WCHAR fmt[] = {'%','1','\n',0};
667  WCHAR newlineW[] = {'\n',0};
668  WCHAR *subkey_name, *subkey_path;
669  HKEY subkey;
670 
671  data = heap_xalloc(max_data_bytes);
672 
673  for (;;)
674  {
675  data_size = max_data_bytes;
676  rc = RegQueryValueExW(key, value_name, NULL, &type, data, &data_size);
677  if (rc == ERROR_MORE_DATA)
678  {
679  max_data_bytes = data_size;
680  data = heap_xrealloc(data, max_data_bytes);
681  }
682  else break;
683  }
684 
685  if (rc == ERROR_SUCCESS)
686  {
687  output_string(fmt, path);
688  output_value(value_name, type, data, data_size);
689  output_string(newlineW);
691  }
692 
693  heap_free(data);
694 
695  if (!recurse)
696  {
697  if (rc == ERROR_FILE_NOT_FOUND)
698  {
699  if (value_name && *value_name)
700  {
702  return 1;
703  }
704  output_string(fmt, path);
706  }
707  return 0;
708  }
709 
710  subkey_name = heap_xalloc(MAX_SUBKEY_LEN * sizeof(WCHAR));
711 
712  path_len = strlenW(path);
713 
714  i = 0;
715  for (;;)
716  {
717  subkey_len = MAX_SUBKEY_LEN;
718  rc = RegEnumKeyExW(key, i, subkey_name, &subkey_len, NULL, NULL, NULL, NULL);
719  if (rc == ERROR_SUCCESS)
720  {
721  subkey_path = build_subkey_path(path, path_len, subkey_name, subkey_len);
722  if (!RegOpenKeyExW(key, subkey_name, 0, KEY_READ, &subkey))
723  {
724  query_value(subkey, value_name, subkey_path, recurse);
725  RegCloseKey(subkey);
726  }
727  heap_free(subkey_path);
728  i++;
729  }
730  else break;
731  }
732 
733  heap_free(subkey_name);
734  return 0;
735 }
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
#define ERROR_SUCCESS
Definition: deptool.c:10
#define MAX_SUBKEY_LEN
Definition: reg.c:657
#define KEY_READ
Definition: nt_native.h:1023
static WCHAR * build_subkey_path(WCHAR *path, DWORD path_len, WCHAR *subkey_name, DWORD subkey_len)
Definition: reg.c:644
__wchar_t WCHAR
Definition: xmlstorage.h:180
BOOL heap_free(void *buf)
Definition: reg.c:113
DWORD DWORD
Definition: winlogon.h:75
#define STRING_CANNOT_FIND
Definition: resource.h:34
GLenum GLclampf GLint i
Definition: glfuncs.h:14
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
long LONG
Definition: pedump.c:60
smooth NULL
Definition: ftsmooth.c:557
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4134
HANDLE HKEY
Definition: registry.h:24
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
void * heap_xrealloc(void *buf, size_t size)
Definition: reg.c:95
static void output_value(const WCHAR *value_name, DWORD type, BYTE *data, DWORD data_size)
Definition: reg.c:614
#define ERROR_MORE_DATA
Definition: dderror.h:13
static void __cdecl output_string(const WCHAR *fmt,...)
Definition: reg.c:173
unsigned char BYTE
Definition: ntddk_ex.h:96
Definition: services.c:311
static DWORD path_len
Definition: batch.c:31
static unsigned int num_values_found
Definition: reg.c:655
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3381
void __cdecl output_message(unsigned int id,...)
Definition: reg.c:158
void * heap_xalloc(size_t size)
Definition: reg.c:84
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
Definition: reg.c:2541
Definition: dsound.c:958
Definition: path.c:42
DWORD type
Definition: reg.c:69
static int query_value(HKEY key, WCHAR *value_name, WCHAR *path, BOOL recurse)
Definition: reg.c:659
#define REG_SZ
Definition: layer.c:22
static int reg_add ( HKEY  root,
WCHAR path,
WCHAR value_name,
BOOL  value_empty,
WCHAR type,
WCHAR  separator,
WCHAR data,
BOOL  force 
)
static

Definition at line 384 of file reg.c.

Referenced by wmain().

386 {
387  HKEY key;
388 
389  if (RegCreateKeyW(root, path, &key) != ERROR_SUCCESS)
390  {
392  return 1;
393  }
394 
395  if (value_name || value_empty || data)
396  {
397  DWORD reg_type;
398  DWORD reg_count = 0;
399  BYTE* reg_data = NULL;
400 
401  if (!force)
402  {
403  if (RegQueryValueExW(key, value_name, NULL, NULL, NULL, NULL) == ERROR_SUCCESS)
404  {
405  if (!ask_confirm(STRING_OVERWRITE_VALUE, value_name))
406  {
407  RegCloseKey(key);
409  return 0;
410  }
411  }
412  }
413 
414  reg_type = wchar_get_type(type);
415  if (reg_type == ~0u)
416  {
417  RegCloseKey(key);
419  return 1;
420  }
421  if ((reg_type == REG_DWORD || reg_type == REG_DWORD_BIG_ENDIAN) && !data)
422  {
423  RegCloseKey(key);
425  return 1;
426  }
427 
428  if (!(reg_data = get_regdata(data, reg_type, separator, &reg_count)))
429  {
430  RegCloseKey(key);
431  return 1;
432  }
433 
434  RegSetValueExW(key, value_name, 0, reg_type, reg_data, reg_count);
435  heap_free(reg_data);
436  }
437 
438  RegCloseKey(key);
440 
441  return 0;
442 }
#define STRING_OVERWRITE_VALUE
Definition: resource.h:39
static const WCHAR separator[]
Definition: asmname.c:45
#define ERROR_SUCCESS
Definition: deptool.c:10
static DWORD wchar_get_type(const WCHAR *type_name)
Definition: reg.c:235
BOOL heap_free(void *buf)
Definition: reg.c:113
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble * u
Definition: glfuncs.h:88
DWORD DWORD
Definition: winlogon.h:75
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
#define STRING_SUCCESS
Definition: resource.h:30
#define STRING_INVALID_CMDLINE
Definition: resource.h:32
#define STRING_INVALID_KEY
Definition: resource.h:31
smooth NULL
Definition: ftsmooth.c:557
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4917
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4134
static LPBYTE get_regdata(const WCHAR *data, DWORD reg_type, WCHAR separator, DWORD *reg_count)
Definition: reg.c:264
HANDLE HKEY
Definition: registry.h:24
static BOOL ask_confirm(unsigned int msgid, WCHAR *reg_info)
Definition: reg.c:183
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
HKEY key
Definition: reg.c:45
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1202
#define REG_DWORD
Definition: nt_native.h:1497
unsigned char BYTE
Definition: ntddk_ex.h:96
#define REG_DWORD_BIG_ENDIAN
Definition: nt_native.h:1499
Definition: services.c:311
#define STRING_UNSUPPORTED_TYPE
Definition: resource.h:35
void __cdecl output_message(unsigned int id,...)
Definition: reg.c:158
type_t * reg_type(type_t *type, const char *name, struct namespace *namespace, int t)
Definition: parser.tab.c:5874
#define STRING_CANCELLED
Definition: resource.h:43
static WCHAR* reg_data_to_wchar ( DWORD  type,
const BYTE src,
DWORD  size_bytes 
)
static

Definition at line 532 of file reg.c.

Referenced by output_value().

533 {
534  WCHAR *buffer = NULL;
535  int i;
536 
537  switch (type)
538  {
539  case REG_SZ:
540  case REG_EXPAND_SZ:
541  buffer = heap_xalloc(size_bytes);
542  strcpyW(buffer, (WCHAR *)src);
543  break;
544  case REG_NONE:
545  case REG_BINARY:
546  {
547  WCHAR *ptr;
548  static const WCHAR fmt[] = {'%','0','2','X',0};
549 
550  buffer = heap_xalloc((size_bytes * 2 + 1) * sizeof(WCHAR));
551  ptr = buffer;
552  for (i = 0; i < size_bytes; i++)
553  ptr += sprintfW(ptr, fmt, src[i]);
554  break;
555  }
556  case REG_DWORD:
557  /* case REG_DWORD_LITTLE_ENDIAN: */
559  {
560  const int zero_x_dword = 10;
561  static const WCHAR fmt[] = {'0','x','%','x',0};
562 
563  buffer = heap_xalloc((zero_x_dword + 1) * sizeof(WCHAR));
564  sprintfW(buffer, fmt, *(DWORD *)src);
565  break;
566  }
567  case REG_MULTI_SZ:
568  {
569  const int two_wchars = 2 * sizeof(WCHAR);
570  DWORD tmp_size;
571  const WCHAR *tmp = (const WCHAR *)src;
572  int len, destindex;
573 
574  if (size_bytes <= two_wchars)
575  {
576  buffer = heap_xalloc(sizeof(WCHAR));
577  *buffer = 0;
578  return buffer;
579  }
580 
581  tmp_size = size_bytes - two_wchars; /* exclude both null terminators */
582  buffer = heap_xalloc(tmp_size * 2 + sizeof(WCHAR));
583  len = tmp_size / sizeof(WCHAR);
584 
585  for (i = 0, destindex = 0; i < len; i++, destindex++)
586  {
587  if (tmp[i])
588  buffer[destindex] = tmp[i];
589  else
590  {
591  buffer[destindex++] = '\\';
592  buffer[destindex] = '0';
593  }
594  }
595  buffer[destindex] = 0;
596  break;
597  }
598  }
599  return buffer;
600 }
#define REG_BINARY
Definition: nt_native.h:1496
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint buffer
Definition: glext.h:5915
#define WCHAR
Definition: msvc.h:43
DWORD DWORD
Definition: winlogon.h:75
GLuint const GLubyte GLvoid * src
Definition: s_context.h:57
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define REG_MULTI_SZ
Definition: nt_native.h:1501
static PVOID ptr
Definition: dispmode.c:30
smooth NULL
Definition: ftsmooth.c:557
GLenum GLsizei len
Definition: glext.h:6722
#define REG_DWORD
Definition: nt_native.h:1497
#define REG_DWORD_BIG_ENDIAN
Definition: nt_native.h:1499
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
#define REG_EXPAND_SZ
Definition: nt_native.h:1494
#define sprintfW
Definition: unicode.h:58
void * heap_xalloc(size_t size)
Definition: reg.c:84
#define REG_NONE
Definition: nt_native.h:1492
Definition: dsound.c:958
#define REG_SZ
Definition: layer.c:22
static int reg_delete ( HKEY  root,
WCHAR path,
WCHAR key_name,
WCHAR value_name,
BOOL  value_empty,
BOOL  value_all,
BOOL  force 
)
static

Definition at line 444 of file reg.c.

Referenced by wmain().

446 {
447  HKEY key;
448 
449  if (!force)
450  {
451  BOOL ret;
452 
453  if (value_name || value_empty)
454  ret = ask_confirm(STRING_DELETE_VALUE, value_name);
455  else if (value_all)
457  else
459 
460  if (!ret)
461  {
463  return 0;
464  }
465  }
466 
467  /* Delete subtree only if no /v* option is given */
468  if (!value_name && !value_empty && !value_all)
469  {
471  {
473  return 1;
474  }
476  return 0;
477  }
478 
479  if (RegOpenKeyW(root, path, &key) != ERROR_SUCCESS)
480  {
482  return 1;
483  }
484 
485  if (value_all)
486  {
487  DWORD max_value_len = 256, value_len;
488  WCHAR *value_name;
489  LONG rc;
490 
491  value_name = heap_xalloc(max_value_len * sizeof(WCHAR));
492 
493  while (1)
494  {
495  value_len = max_value_len;
496  rc = RegEnumValueW(key, 0, value_name, &value_len, NULL, NULL, NULL, NULL);
497  if (rc == ERROR_SUCCESS)
498  {
499  rc = RegDeleteValueW(key, value_name);
500  if (rc != ERROR_SUCCESS)
501  {
502  heap_free(value_name);
503  RegCloseKey(key);
505  return 1;
506  }
507  }
508  else if (rc == ERROR_MORE_DATA)
509  {
510  max_value_len *= 2;
511  value_name = heap_xrealloc(value_name, max_value_len * sizeof(WCHAR));
512  }
513  else break;
514  }
515  heap_free(value_name);
516  }
517  else if (value_name || value_empty)
518  {
519  if (RegDeleteValueW(key, value_empty ? NULL : value_name) != ERROR_SUCCESS)
520  {
521  RegCloseKey(key);
523  return 1;
524  }
525  }
526 
527  RegCloseKey(key);
529  return 0;
530 }
#define ERROR_SUCCESS
Definition: deptool.c:10
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define STRING_DELETE_VALUE
Definition: resource.h:45
BOOL heap_free(void *buf)
Definition: reg.c:113
#define STRING_VALUEALL_FAILED
Definition: resource.h:49
DWORD DWORD
Definition: winlogon.h:75
#define STRING_DELETE_VALUEALL
Definition: resource.h:46
#define STRING_CANNOT_FIND
Definition: resource.h:34
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
long LONG
Definition: pedump.c:60
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3311
#define STRING_SUCCESS
Definition: resource.h:30
LONG WINAPI RegEnumValueW(_In_ HKEY hKey, _In_ DWORD index, _Out_ LPWSTR value, _Inout_ PDWORD val_count, _Reserved_ PDWORD reserved, _Out_opt_ PDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ PDWORD count)
Definition: reg.c:2867
smooth NULL
Definition: ftsmooth.c:557
unsigned int BOOL
Definition: ntddk_ex.h:94
HANDLE HKEY
Definition: registry.h:24
static BOOL ask_confirm(unsigned int msgid, WCHAR *reg_info)
Definition: reg.c:183
int ret
#define STRING_DELETE_SUBKEY
Definition: resource.h:47
HKEY key
Definition: reg.c:45
void * heap_xrealloc(void *buf, size_t size)
Definition: reg.c:95
#define ERROR_MORE_DATA
Definition: dderror.h:13
LSTATUS WINAPI RegDeleteTreeW(HKEY hKey, LPCWSTR lpszSubKey)
Definition: reg.c:1755
LONG WINAPI RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName)
Definition: reg.c:2368
Definition: services.c:311
void __cdecl output_message(unsigned int id,...)
Definition: reg.c:158
void * heap_xalloc(size_t size)
Definition: reg.c:84
#define STRING_CANCELLED
Definition: resource.h:43
static int reg_query ( HKEY  root,
WCHAR path,
WCHAR key_name,
WCHAR value_name,
BOOL  value_empty,
BOOL  recurse 
)
static

Definition at line 824 of file reg.c.

Referenced by wmain().

826 {
827  HKEY key;
828  WCHAR newlineW[] = {'\n',0};
829  int ret;
830 
831  if (RegOpenKeyExW(root, path, 0, KEY_READ, &key) != ERROR_SUCCESS)
832  {
834  return 1;
835  }
836 
837  output_string(newlineW);
838 
839  if (value_name || value_empty)
840  {
841  ret = query_value(key, value_name, key_name, recurse);
842  if (recurse)
844  }
845  else
846  ret = query_all(key, key_name, recurse);
847 
848  RegCloseKey(key);
849 
850  return ret;
851 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define KEY_READ
Definition: nt_native.h:1023
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define STRING_CANNOT_FIND
Definition: resource.h:34
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
HANDLE HKEY
Definition: registry.h:24
int ret
HKEY key
Definition: reg.c:45
#define STRING_MATCHES_FOUND
Definition: resource.h:51
static void __cdecl output_string(const WCHAR *fmt,...)
Definition: reg.c:173
Definition: services.c:311
static unsigned int num_values_found
Definition: reg.c:655
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3381
void __cdecl output_message(unsigned int id,...)
Definition: reg.c:158
static int query_all(HKEY key, WCHAR *path, BOOL recurse)
Definition: reg.c:737
static int query_value(HKEY key, WCHAR *value_name, WCHAR *path, BOOL recurse)
Definition: reg.c:659
static const WCHAR* reg_type_to_wchar ( DWORD  type)
static

Definition at line 602 of file reg.c.

Referenced by output_value().

603 {
605 
606  for (i = 0; i < array_size; i++)
607  {
608  if (type == type_rels[i].type)
609  return type_rels[i].name;
610  }
611  return NULL;
612 }
static const struct @3 type_rels[]
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static UINT array_size
Definition: msctf.c:51
GLenum GLclampf GLint i
Definition: glfuncs.h:14
smooth NULL
Definition: ftsmooth.c:557
#define ARRAY_SIZE(A)
Definition: reg.h:24
static BOOL sane_path ( const WCHAR key)
static

Definition at line 365 of file reg.c.

Referenced by parse_registry_key().

366 {
367  unsigned int i = strlenW(key);
368 
369  if (i < 3 || (key[i - 1] == '\\' && key[i - 2] == '\\'))
370  {
372  return FALSE;
373  }
374 
375  if (key[0] == '\\' && key[1] == '\\' && key[2] != '\\')
376  {
378  return FALSE;
379  }
380 
381  return TRUE;
382 }
#define TRUE
Definition: types.h:120
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define FALSE
Definition: types.h:117
#define STRING_INVALID_KEY
Definition: resource.h:31
#define STRING_NO_REMOTE
Definition: resource.h:33
void __cdecl output_message(unsigned int id,...)
Definition: reg.c:158
Definition: path.c:42
static DWORD wchar_get_type ( const WCHAR type_name)
static

Definition at line 235 of file reg.c.

Referenced by reg_add().

236 {
237  DWORD i;
238 
239  if (!type_name)
240  return REG_SZ;
241 
242  for (i = 0; i < ARRAY_SIZE(type_rels); i++)
243  {
244  if (!strcmpiW(type_rels[i].name, type_name))
245  return type_rels[i].type;
246  }
247 
248  return ~0u;
249 }
static const struct @3 type_rels[]
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble * u
Definition: glfuncs.h:88
DWORD DWORD
Definition: winlogon.h:75
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define ARRAY_SIZE(A)
Definition: reg.h:24
#define strcmpiW(s1, s2)
Definition: unicode.h:39
Definition: name.c:23
#define REG_SZ
Definition: layer.c:22
WINE_DEFAULT_DEBUG_CHANNEL ( reg  )
int wmain ( int  argc,
WCHAR argvW[] 
)

Definition at line 951 of file reg.c.

952 {
953  int i, op, op_help, ret;
954  BOOL show_op_help = FALSE;
955  static const WCHAR switchVAW[] = {'v','a',0};
956  static const WCHAR switchVEW[] = {'v','e',0};
957  WCHAR *key_name, *path, *value_name = NULL, *type = NULL, *data = NULL, separator = '\0';
958  BOOL value_empty = FALSE, value_all = FALSE, recurse = FALSE, force = FALSE;
959  HKEY root;
960 
961  if (argc == 1)
962  {
965  return 1;
966  }
967 
968  if (is_help_switch(argvW[1]))
969  {
971  return 0;
972  }
973 
974  op = get_operation(argvW[1], &op_help);
975 
976  if (op == REG_INVALID)
977  {
980  return 1;
981  }
982 
983  if (argc > 2)
984  show_op_help = is_help_switch(argvW[2]);
985 
986  if (argc == 2 || ((show_op_help || op == REG_IMPORT) && argc > 3))
987  {
990  return 1;
991  }
992  else if (show_op_help)
993  {
994  output_message(op_help);
995  return 0;
996  }
997 
998  if (op == REG_IMPORT)
999  return reg_import(argvW[2]);
1000 
1001  if (!parse_registry_key(argvW[2], &root, &path, &key_name))
1002  return 1;
1003 
1004  for (i = 3; i < argc; i++)
1005  {
1006  if (argvW[i][0] == '/' || argvW[i][0] == '-')
1007  {
1008  WCHAR *ptr = &argvW[i][1];
1009 
1010  if (!lstrcmpiW(ptr, switchVEW))
1011  {
1012  value_empty = TRUE;
1013  continue;
1014  }
1015  else if (!lstrcmpiW(ptr, switchVAW))
1016  {
1017  value_all = TRUE;
1018  continue;
1019  }
1020  else if (!ptr[0] || ptr[1])
1021  {
1023  return 1;
1024  }
1025 
1026  switch(tolowerW(argvW[i][1]))
1027  {
1028  case 'v':
1029  if (value_name || !(value_name = argvW[++i]))
1030  {
1032  return 1;
1033  }
1034  break;
1035  case 't':
1036  if (type || !(type = argvW[++i]))
1037  {
1039  return 1;
1040  }
1041  break;
1042  case 'd':
1043  if (data || !(data = argvW[++i]))
1044  {
1046  return 1;
1047  }
1048  break;
1049  case 's':
1050  if (op == REG_QUERY)
1051  {
1052  recurse = TRUE;
1053  break;
1054  }
1055 
1056  ptr = argvW[++i];
1057  if (!ptr || strlenW(ptr) != 1)
1058  {
1060  return 1;
1061  }
1062  separator = ptr[0];
1063  break;
1064  case 'f':
1065  force = TRUE;
1066  break;
1067  default:
1069  return 1;
1070  }
1071  }
1072  }
1073 
1074  if ((value_name && value_empty) || (value_name && value_all) || (value_empty && value_all))
1075  {
1077  return 1;
1078  }
1079 
1080  if (op == REG_ADD)
1081  ret = reg_add(root, path, value_name, value_empty, type, separator, data, force);
1082  else if (op == REG_DELETE)
1083  ret = reg_delete(root, path, key_name, value_name, value_empty, value_all, force);
1084  else
1085  ret = reg_query(root, path, key_name, value_name, value_empty, recurse);
1086  return ret;
1087 }
static int argc
Definition: ServiceArgs.c:15
#define STRING_USAGE
Definition: resource.h:26
static int reg_delete(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name, BOOL value_empty, BOOL value_all, BOOL force)
Definition: reg.c:444
#define TRUE
Definition: types.h:120
Definition: reg.c:915
static const WCHAR separator[]
Definition: asmname.c:45
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLsizei const GLchar ** path
Definition: glext.h:7234
struct _root root
static int reg_query(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name, BOOL value_empty, BOOL recurse)
Definition: reg.c:824
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static BOOL is_help_switch(const WCHAR *s)
Definition: reg.c:900
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define FALSE
Definition: types.h:117
UINT op
Definition: effect.c:219
#define STRING_INVALID_CMDLINE
Definition: resource.h:32
static PVOID ptr
Definition: dispmode.c:30
static enum operations get_operation(const WCHAR *str, int *op_help)
Definition: reg.c:919
#define STRING_FUNC_HELP
Definition: resource.h:55
static int reg_add(HKEY root, WCHAR *path, WCHAR *value_name, BOOL value_empty, WCHAR *type, WCHAR separator, WCHAR *data, BOOL force)
Definition: reg.c:384
smooth NULL
Definition: ftsmooth.c:557
unsigned int BOOL
Definition: ntddk_ex.h:94
HANDLE HKEY
Definition: registry.h:24
#define STRING_INVALID_SYNTAX
Definition: resource.h:52
#define STRING_REG_HELP
Definition: resource.h:54
WINE_UNICODE_INLINE WCHAR tolowerW(WCHAR ch)
Definition: unicode.h:135
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
int ret
int reg_import(const WCHAR *filename)
Definition: import.c:989
void __cdecl output_message(unsigned int id,...)
Definition: reg.c:158
Definition: reg.c:912
#define STRING_INVALID_OPTION
Definition: resource.h:53
static BOOL parse_registry_key(const WCHAR *key, HKEY *root, WCHAR **path, WCHAR **long_key)
Definition: reg.c:880
WINE_UNICODE_INLINE WCHAR * struprW(WCHAR *str)
Definition: unicode.h:288

Variable Documentation

Definition at line 45 of file reg.c.

Referenced by ___w64_mingwthr_add_key_dtor(), __mingwthr_key_dtor(), __mingwthr_remove_key_dtor(), ATL::CRegKey::_DoDeleteKeyTree(), _mesa_bsearch(), _mesa_HashFindFreeKeyBlock(), _mesa_HashInsert(), _test_key_exists(), _test_key_not_exists(), _TIFFFindFieldByName(), acm_driver_callback(), ACTION_AppSearchIni(), ACTION_RegisterMIMEInfo(), add_param(), add_userkey(), AddDisplayDevice(), AddDlg_OnCommand(), afm_parse_kern_data(), afm_parse_kern_pairs(), afm_parse_track_kern(), afm_parser_next_key(), afm_parser_parse(), afm_parser_skip_section(), apply_image_attributes(), arbfp_blit_type_compare(), bsearch(), cache_container_set_size(), CategoryMgr_FindClosestCategory(), CDecodeEnvelopedMsg_CrtlDecrypt(), CDecodeSignedMsg_VerifySignatureWithKey(), check_dirid(), cleanup_eventlog(), COM_OpenKeyForCLSID(), COMCAT_ICatInformation_GetCategoryDesc(), COMCAT_ICatInformation_IsClassOfCategories(), COMCAT_RegisterClassCategories(), compare_function_decl_rb(), compare_function_rb(), compare_hlsl_types_rb(), CountUniqueItems_Aux(), create_diff_row_query(), create_monodata(), create_new_eventlog(), create_server(), CRYPT_CreateKeyProv(), CRYPT_ExportRsaPublicKeyInfoEx(), CRYPT_GetFuncFromReg(), CRYPT_ImportKeyTrans(), CRYPT_ImportSystemRootCertsToReg(), CRYPT_LoadSIPFunc(), CRYPT_RegOpenStore(), CRYPT_RegWriteToReg(), CRYPT_VerifyCertSignatureFromPublicKeyInfo(), CRYPTDLG_CheckOnlineCRL(), CryptGetDefaultOIDDllList(), CryptRegisterDefaultOIDFunction(), CryptSIPRetrieveSubjectGuid(), CryptUnregisterDefaultOIDFunction(), d3dcompiler_shader_reflection_type_compare(), d3drm_animation2_AddPositionKey(), d3drm_animation2_AddRotateKey(), d3drm_animation2_AddScaleKey(), d3drm_animation2_DeleteKey(), d3drm_animation2_GetKeys(), DECLARE_INTERFACE_(), deformat_component(), deformat_environment(), deformat_file(), dictInsertBefore(), dump_child_(), EDIT_CheckCombo(), ensure_useragent(), export_is_key_exportable(), export_registry_key(), IconCache::extract(), fetch_machine_product(), ft_hash_str_insert(), ft_hash_str_lookup(), FTP_Connect(), full_title(), fxt1_choose(), get_cert_mgr_usages(), get_default_proxy_reg_value(), get_install_root(), hhp_pair::get_key(), get_key_state(), get_key_value(), get_mono_path_from_registry(), get_reg_dword(), get_shell_icon_size(), GetInstalledVersion_WowUser(), GetScanCode(), glsl_program_key_compare(), hash_bucket(), hash_insert(), hhp_pair::hhp_pair(), I_CryptReadTrustedPublisherDWORDValueFromRegistry(), inf_value_parse(), CAutoComplete::Init(), init_driver(), init_strings(), InitLogs(), InputProcessorProfiles_EnableLanguageProfile(), InputProcessorProfiles_EnableLanguageProfileByDefault(), InputProcessorProfiles_IsEnabledLanguageProfile(), install_inf_file(), INTERNET_LoadProxySettings(), INTERNET_SaveProxySettings(), ITERATE_InstallService(), ITERATE_RemoveIniValuesOnInstall(), ITERATE_RemoveIniValuesOnUninstall(), ITERATE_WriteIniValues(), ITERATE_WriteRegistryValues(), load_sys_chunks(), MMDevEnum_GetDefaultAudioEndpoint(), MMDevice_Create(), MMDevPropStore_OpenPropKey(), MSI_EnumComponentQualifiers(), msi_publish_install_properties(), msi_validate_product_id(), NdrDllRegisterProxy(), notif_thread_proc(), okChildInt_(), okChildIntBroken_(), okChildPath_(), okChildString_(), ole_server(), process_hook_section(), ProcessKeys(), PROFILE_DeleteAllKeys(), PROFILE_DeleteKey(), PROFILE_Find(), PROFILE_Free(), PROFILE_GetSection(), PROFILE_Load(), PROFILE_Save(), rdssl_sign_ok(), reg_add(), reg_delete(), reg_query(), register_interfaces(), register_key_defvalueA(), register_key_defvalueW(), register_verb(), register_vfw_codecs(), RegisterTypeLib(), resolve_keypath(), RfsdLookupFileName(), RfsdProcessDirEntry(), save_cert_mgr_usages(), SECUR32_initializeProviders(), set_ldids(), ATL::CSimpleMap< TKey, TVal, TEqual >::SetAtIndex(), ATL::CRegKey::SetKeyValue(), SETUPDI_OpenDevKey(), SETUPDI_OpenDrvKey(), SetupDiCreateDeviceInterfaceRegKeyA(), SetupDiCreateDevRegKeyA(), SetupDiCreateDevRegKeyW(), SetupDiOpenClassRegKeyExW(), SetupDiOpenDevRegKey(), ATL::CRegKey::SetValue(), SHGetObjectCompatFlags(), SHGetShellKey(), si_compar(), sparse_array_add(), sqliteKeywordCode(), START_TEST(), sti_compar(), test__lfind_s(), test_Add(), test_animation(), test_autocreation(), test_comparemode(), test_completion_port(), test_Exists(), test_get_profiles_dir(), test_hash_value(), test_header(), test_IEnumVARIANT(), test_import_hmac(), test_interfaces(), test_internet_features(), test_Item(), test_Keys(), test_ldap_parse_sort_control(), test_long_value_name(), test_NonExistentPath(), test_notify(), test_NtCreateKey(), test_NtOpenKey(), test_NtQueryKey(), test_NtQueryValueKey(), test_NtSetValueKey(), test_null_provider(), test_perflib_key(), test_publish_components(), test_query(), test_readTrustedPublisherDWORD(), test_redirection(), test_reg_delete_key(), test_register_font(), test_registerDefaultOIDFunction(), test_registry(), test_RegNotifyChangeKeyValue(), test_RegOpenCurrentUser(), test_RegPolicyFlags(), test_Remove(), test_remove_env_strings(), test_remove_registry_values(), test_save(), test_SHGetFolderPathA(), test_SHRegCloseUSKey(), test_signed_msg_encoding(), test_signed_msg_update(), test_sioAddressListChange(), test_symlinks(), test_synchronous_WSAIoctl(), testAcquireCertPrivateKey(), testAcquireSecurityContext(), testCreateSelfSignCert(), testDeviceRegistryPropertyA(), testDeviceRegistryPropertyW(), testExportPublicKey(), testGetPublicKeyLength(), testImportPublicKey(), testRegisterAndGetDetail(), Tests_Insert_And_Delete(), testSignCert(), TIFFFindField(), TLB_register_interface(), TOOLBAR_Save(), TreeNodeMake(), tt_face_get_kerning(), TuiEditBox(), TuiMessageBoxCritical(), UpdateKeyStateFromMsg(), urlcache_hash_entry_create(), urlcache_hash_key(), usp10_compare_script_range(), VARIANT_GetNamedFormat(), wine_get_sortkey(), wined3d_ffp_frag_program_key_compare(), wined3d_ffp_vertex_program_key_compare(), WinHttpGetDefaultProxyConfiguration(), WinHttpSetDefaultProxyConfiguration(), WintrustGetRegPolicyFlags(), WintrustSetRegPolicyFlags(), write_superblocks(), xmlDictExists(), xmlDictGrow(), xmlDictLookup(), xmlDictQLookup(), xmlHashAddEntry3(), xmlHashGrow(), xmlHashLookup3(), xmlHashQLookup3(), xmlHashRemoveEntry3(), xmlHashUpdateEntry3(), and xsltAddKey().

const WCHAR long_hkcc[] = {'H','K','E','Y','_','C','U','R','R','E','N','T','_','C','O','N','F','I','G',0}
static

Definition at line 41 of file reg.c.

const WCHAR long_hkcr[] = {'H','K','E','Y','_','C','L','A','S','S','E','S','_','R','O','O','T',0}
static

Definition at line 39 of file reg.c.

const WCHAR long_hkcu[] = {'H','K','E','Y','_','C','U','R','R','E','N','T','_','U','S','E','R',0}
static

Definition at line 38 of file reg.c.

const WCHAR long_hklm[] = {'H','K','E','Y','_','L','O','C','A','L','_','M','A','C','H','I','N','E',0}
static

Definition at line 37 of file reg.c.

const WCHAR long_hku[] = {'H','K','E','Y','_','U','S','E','R','S',0}
static

Definition at line 40 of file reg.c.

const WCHAR* long_name

Definition at line 47 of file reg.c.

Referenced by get_long_key(), lfn_check_orphaned(), lfn_get(), and path_get_rootkey().

Definition at line 70 of file reg.c.

Referenced by reg_get_stringvalue(), and test_NtQueryLicenseKey().

unsigned int num_values_found = 0
static

Definition at line 655 of file reg.c.

Referenced by query_value(), and reg_query().

const { ... } root_rels[]
Initial value:
=
{
}
#define HKEY_USERS
Definition: winreg.h:13
static const WCHAR long_hklm[]
Definition: reg.c:37
static const WCHAR long_hku[]
Definition: reg.c:40
#define HKEY_CURRENT_USER
Definition: winreg.h:11
#define HKEY_CURRENT_CONFIG
Definition: winreg.h:15
static const WCHAR short_hklm[]
Definition: reg.c:32
static const WCHAR long_hkcr[]
Definition: reg.c:39
static const WCHAR short_hku[]
Definition: reg.c:35
static const WCHAR long_hkcu[]
Definition: reg.c:38
static const WCHAR long_hkcc[]
Definition: reg.c:41
static const WCHAR short_hkcc[]
Definition: reg.c:36
static const WCHAR short_hkcu[]
Definition: reg.c:33
static const WCHAR short_hkcr[]
Definition: reg.c:34
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by get_long_key(), and path_get_rootkey().

const WCHAR short_hkcc[] = {'H','K','C','C',0}
static

Definition at line 36 of file reg.c.

const WCHAR short_hkcr[] = {'H','K','C','R',0}
static

Definition at line 34 of file reg.c.

const WCHAR short_hkcu[] = {'H','K','C','U',0}
static

Definition at line 33 of file reg.c.

const WCHAR short_hklm[] = {'H','K','L','M',0}
static

Definition at line 32 of file reg.c.

const WCHAR short_hku[] = {'H','K','U',0}
static

Definition at line 35 of file reg.c.

const WCHAR* short_name

Definition at line 46 of file reg.c.

Referenced by get_graft(), lfn_get(), and path_get_rootkey().

const WCHAR type_binary[] = {'R','E','G','_','B','I','N','A','R','Y',0}
static

Definition at line 61 of file reg.c.

const WCHAR type_dword[] = {'R','E','G','_','D','W','O','R','D',0}
static

Definition at line 62 of file reg.c.

const WCHAR type_dword_be[] = {'R','E','G','_','D','W','O','R','D','_','B','I','G','_','E','N','D','I','A','N',0}
static

Definition at line 64 of file reg.c.

const WCHAR type_dword_le[] = {'R','E','G','_','D','W','O','R','D','_','L','I','T','T','L','E','_','E','N','D','I','A','N',0}
static

Definition at line 63 of file reg.c.

const WCHAR type_expand_sz[] = {'R','E','G','_','E','X','P','A','N','D','_','S','Z',0}
static

Definition at line 60 of file reg.c.

const WCHAR type_multi_sz[] = {'R','E','G','_','M','U','L','T','I','_','S','Z',0}
static

Definition at line 65 of file reg.c.

const WCHAR type_none[] = {'R','E','G','_','N','O','N','E',0}
static

Definition at line 58 of file reg.c.

const { ... } type_rels[]
Initial value:
=
{
}
#define REG_BINARY
Definition: nt_native.h:1496
static const WCHAR type_sz[]
Definition: reg.c:59
static const WCHAR type_none[]
Definition: reg.c:58
static const WCHAR type_dword_be[]
Definition: reg.c:64
#define REG_MULTI_SZ
Definition: nt_native.h:1501
static const WCHAR type_multi_sz[]
Definition: reg.c:65
static const WCHAR type_binary[]
Definition: reg.c:61
#define REG_DWORD_LITTLE_ENDIAN
Definition: nt_native.h:1498
static const WCHAR type_dword[]
Definition: reg.c:62
#define REG_DWORD
Definition: nt_native.h:1497
#define REG_DWORD_BIG_ENDIAN
Definition: nt_native.h:1499
static const WCHAR type_expand_sz[]
Definition: reg.c:60
#define REG_EXPAND_SZ
Definition: nt_native.h:1494
#define REG_NONE
Definition: nt_native.h:1492
static const WCHAR type_dword_le[]
Definition: reg.c:63
#define REG_SZ
Definition: layer.c:22

Referenced by reg_type_to_wchar(), and wchar_get_type().

const WCHAR type_sz[] = {'R','E','G','_','S','Z',0}
static

Definition at line 59 of file reg.c.