ReactOS  0.4.12-dev-43-g63b00d8
registry.c
Go to the documentation of this file.
1 /*
2  * Wordpad implementation - Registry functions
3  *
4  * Copyright 2007 by Alexander N. Sørnes <alex@thehandofagony.com>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20 
21 #define WIN32_NO_STATUS
22 #define WIN32_LEAN_AND_MEAN
23 #include <windows.h>
24 #include <shlobj.h>
25 #include <richedit.h>
26 
27 #include "wordpad.h"
28 
29 static const WCHAR key_recentfiles[] = {'R','e','c','e','n','t',' ','f','i','l','e',
30  ' ','l','i','s','t',0};
31 static const WCHAR key_options[] = {'O','p','t','i','o','n','s',0};
32 static const WCHAR key_settings[] = {'S','e','t','t','i','n','g','s',0};
33 static const WCHAR key_rtf[] = {'R','T','F',0};
34 static const WCHAR key_text[] = {'T','e','x','t',0};
35 
36 static const WCHAR var_file[] = {'F','i','l','e','%','d',0};
37 static const WCHAR var_framerect[] = {'F','r','a','m','e','R','e','c','t',0};
38 static const WCHAR var_barstate0[] = {'B','a','r','S','t','a','t','e','0',0};
39 static const WCHAR var_wrap[] = {'W','r','a','p',0};
40 static const WCHAR var_maximized[] = {'M','a','x','i','m','i','z','e','d',0};
41 
43 {
44  LONG ret;
45  static const WCHAR wszProgramKey[] = {'S','o','f','t','w','a','r','e','\\',
46  'M','i','c','r','o','s','o','f','t','\\',
47  'W','i','n','d','o','w','s','\\',
48  'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
49  'A','p','p','l','e','t','s','\\',
50  'W','o','r','d','p','a','d',0};
51  LPWSTR key = (LPWSTR)wszProgramKey;
52 
53  if(subKey)
54  {
55  WCHAR backslash[] = {'\\',0};
57  (lstrlenW(wszProgramKey)+lstrlenW(subKey)+lstrlenW(backslash)+1)
58  *sizeof(WCHAR));
59 
60  if(!key)
61  return 1;
62 
63  lstrcpyW(key, wszProgramKey);
64  lstrcatW(key, backslash);
65  lstrcatW(key, subKey);
66  }
67 
68  if(action)
69  {
71  KEY_READ | KEY_WRITE, NULL, hKey, action);
72  } else
73  {
74  ret = RegOpenKeyExW(HKEY_CURRENT_USER, key, 0, KEY_READ | KEY_WRITE, hKey);
75  }
76 
77  if(subKey)
78  HeapFree(GetProcessHeap(), 0, key);
79 
80  return ret;
81 }
82 
84 {
85  HKEY hKey = 0;
86  DWORD action;
87 
88  if(registry_get_handle(&hKey, &action, key_options) == ERROR_SUCCESS)
89  {
90  WINDOWPLACEMENT wp;
91  DWORD isMaximized;
92 
93  wp.length = sizeof(WINDOWPLACEMENT);
94  GetWindowPlacement(hMainWnd, &wp);
95  isMaximized = (wp.showCmd == SW_SHOWMAXIMIZED);
96 
98  RegSetValueExW(hKey, var_maximized, 0, REG_DWORD, (LPBYTE)&isMaximized, sizeof(DWORD));
99 
101  RegCloseKey(hKey);
102  }
103 
104  if(registry_get_handle(&hKey, &action, key_settings) == ERROR_SUCCESS)
105  {
107  RegCloseKey(hKey);
108  }
109 }
110 
112 {
113  HKEY hKey = 0;
114  DWORD size = sizeof(RECT);
115 
116  if(registry_get_handle(&hKey, 0, key_options) != ERROR_SUCCESS ||
117  RegQueryValueExW(hKey, var_framerect, 0, NULL, (LPBYTE)rc, &size) !=
118  ERROR_SUCCESS || size != sizeof(RECT))
119  SetRect(rc, 0, 0, 600, 300);
120 
121  RegCloseKey(hKey);
122 }
123 
125 {
126  HKEY hKey = 0;
127  DWORD size = sizeof(DWORD);
128 
129  if(registry_get_handle(&hKey, 0, key_options) != ERROR_SUCCESS ||
130  RegQueryValueExW(hKey, var_maximized, 0, NULL, (LPBYTE)bMaximized, &size) !=
131  ERROR_SUCCESS || size != sizeof(DWORD))
132  {
133  *bMaximized = FALSE;
134  }
135 
136  RegCloseKey(hKey);
137 }
138 
139 static void truncate_path(LPWSTR file, LPWSTR out, LPWSTR pos1, LPWSTR pos2)
140 {
141  static const WCHAR dots[] = {'.','.','.',0};
142 
143  *++pos1 = 0;
144 
145  lstrcatW(out, file);
146  lstrcatW(out, dots);
147  lstrcatW(out, pos2);
148 }
149 
151 {
152  LPWSTR pos_basename;
153  LPWSTR truncpos1, truncpos2;
154  WCHAR myDocs[MAX_PATH];
155 
157  pos_basename = file_basename(file);
158  truncpos1 = NULL;
159  truncpos2 = NULL;
160 
161  *(pos_basename-1) = 0;
162  if(!lstrcmpiW(file, myDocs) || (lstrlenW(pos_basename) > FILELIST_ENTRY_LENGTH))
163  {
164  truncpos1 = pos_basename;
165  *(pos_basename-1) = '\\';
166  } else
167  {
168  LPWSTR pos;
169  BOOL morespace = FALSE;
170 
171  *(pos_basename-1) = '\\';
172 
173  for(pos = file; pos < pos_basename; pos++)
174  {
175  if(*pos == '\\' || *pos == '/')
176  {
177  if(truncpos1)
178  {
179  if((pos - file + lstrlenW(pos_basename)) > FILELIST_ENTRY_LENGTH)
180  break;
181 
182  truncpos1 = pos;
183  morespace = TRUE;
184  break;
185  }
186 
187  if((pos - file + lstrlenW(pos_basename)) > FILELIST_ENTRY_LENGTH)
188  break;
189 
190  truncpos1 = pos;
191  }
192  }
193 
194  if(morespace)
195  {
196  for(pos = pos_basename; pos >= truncpos1; pos--)
197  {
198  if(*pos == '\\' || *pos == '/')
199  {
200  if((truncpos1 - file + lstrlenW(pos_basename) + pos_basename - pos) > FILELIST_ENTRY_LENGTH)
201  break;
202 
203  truncpos2 = pos;
204  }
205  }
206  }
207  }
208 
209  if(truncpos1 == pos_basename)
210  lstrcatW(out, pos_basename);
211  else if(truncpos1 == truncpos2 || !truncpos2)
212  lstrcatW(out, file);
213  else
214  truncate_path(file, out, truncpos1, truncpos2);
215 }
216 
218 {
219  HKEY hFileKey;
220 
222  {
223  WCHAR itemText[MAX_PATH+3], buffer[MAX_PATH];
224  /* The menu item name is not the same as the file name, so we need to store
225  the file name here */
226  static WCHAR file1[MAX_PATH], file2[MAX_PATH], file3[MAX_PATH], file4[MAX_PATH];
227  WCHAR numFormat[] = {'&','%','d',' ',0};
228  LPWSTR pFile[] = {file1, file2, file3, file4};
229  DWORD pathSize = MAX_PATH*sizeof(WCHAR);
230  int i;
231  WCHAR key[6];
233  HMENU hMenu = GetMenu(hMainWnd);
234 
235  mi.cbSize = sizeof(MENUITEMINFOW);
237  mi.fType = MFT_STRING;
238  mi.dwTypeData = itemText;
239  mi.wID = ID_FILE_RECENT1;
240 
242  for(i = 0; i < FILELIST_ENTRIES; i++)
243  {
244  wsprintfW(key, var_file, i+1);
246  if(RegQueryValueExW(hFileKey, (LPWSTR)key, 0, NULL, (LPBYTE)pFile[i], &pathSize)
247  != ERROR_SUCCESS)
248  break;
249 
250  mi.dwItemData = (ULONG_PTR)pFile[i];
251  wsprintfW(itemText, numFormat, i+1);
252 
253  lstrcpyW(buffer, pFile[i]);
254 
255  format_filelist_filename(buffer, itemText);
256 
257  InsertMenuItemW(hMenu, ID_FILE_EXIT, FALSE, &mi);
258  mi.wID++;
259  pathSize = MAX_PATH*sizeof(WCHAR);
260  }
261  mi.fType = MFT_SEPARATOR;
262  mi.fMask = MIIM_FTYPE | MIIM_ID;
263  InsertMenuItemW(hMenu, ID_FILE_EXIT, FALSE, &mi);
264 
265  RegCloseKey(hFileKey);
266  }
267 }
268 
270 {
271  HKEY hKey;
272  DWORD action;
273 
274  if(registry_get_handle(&hKey, &action, key_recentfiles) == ERROR_SUCCESS)
275  {
276  LPCWSTR pFiles[FILELIST_ENTRIES];
277  int i;
278  HMENU hMenu = GetMenu(hMainWnd);
280  WCHAR buffer[6];
281 
282  mi.cbSize = sizeof(MENUITEMINFOW);
283  mi.fMask = MIIM_DATA;
284 
285  for(i = 0; i < FILELIST_ENTRIES; i++)
286  pFiles[i] = NULL;
287 
288  for(i = 0; GetMenuItemInfoW(hMenu, ID_FILE_RECENT1+i, FALSE, &mi); i++)
289  pFiles[i] = (LPWSTR)mi.dwItemData;
290 
291  if(lstrcmpiW(newFile, pFiles[0]))
292  {
293  for(i = 0; i < FILELIST_ENTRIES && pFiles[i]; i++)
294  {
295  if(!lstrcmpiW(pFiles[i], newFile))
296  {
297  int j;
298  for(j = 0; j < i; j++)
299  {
300  pFiles[i-j] = pFiles[i-j-1];
301  }
302  pFiles[0] = NULL;
303  break;
304  }
305  }
306 
307  if(!pFiles[0])
308  {
309  pFiles[0] = newFile;
310  } else
311  {
312  for(i = 0; i < FILELIST_ENTRIES-1; i++)
313  pFiles[FILELIST_ENTRIES-1-i] = pFiles[FILELIST_ENTRIES-2-i];
314 
315  pFiles[0] = newFile;
316  }
317 
318  for(i = 0; i < FILELIST_ENTRIES && pFiles[i]; i++)
319  {
320  wsprintfW(buffer, var_file, i+1);
321  RegSetValueExW(hKey, (LPWSTR)&buffer, 0, REG_SZ, (const BYTE*)pFiles[i],
322  (lstrlenW(pFiles[i])+1)*sizeof(WCHAR));
323  }
324  }
325  RegCloseKey(hKey);
326  }
327  registry_read_filelist(hMainWnd);
328 }
329 
331 {
332  return (format & SF_TEXT) ? 1 : 0;
333 }
334 
336 {
337  HKEY hKey;
338 
341  else
342  {
344  RegCloseKey(hKey);
345  }
346 
349  } else {
351  RegCloseKey(hKey);
352  }
353 }
354 
356 {
357  HKEY hKey;
358  DWORD action = 0;
359  BOOL fetched = FALSE;
360  barState[index] = 0;
361  wordWrap[index] = 0;
362 
363  if(registry_get_handle(&hKey, &action, key) != ERROR_SUCCESS)
364  return;
365 
366  if(action == REG_OPENED_EXISTING_KEY)
367  {
368  DWORD size = sizeof(DWORD);
369 
370  if(RegQueryValueExW(hKey, var_barstate0, 0, NULL, (LPBYTE)&barState[index],
371  &size) == ERROR_SUCCESS)
372  fetched = TRUE;
373  }
374 
375  if(!fetched)
376  barState[index] = (1 << BANDID_TOOLBAR) | (1 << BANDID_FORMATBAR) | (1 << BANDID_RULER) | (1 << BANDID_STATUSBAR);
377 
378  fetched = FALSE;
379  if(action == REG_OPENED_EXISTING_KEY)
380  {
381  DWORD size = sizeof(DWORD);
382  if(RegQueryValueExW(hKey, var_wrap, 0, NULL, (LPBYTE)&wordWrap[index],
383  &size) == ERROR_SUCCESS)
384  fetched = TRUE;
385  }
386 
387  if (!fetched)
388  {
389  if(index == reg_formatindex(SF_RTF))
390  wordWrap[index] = ID_WORDWRAP_WINDOW;
391  else if(index == reg_formatindex(SF_TEXT))
392  wordWrap[index] = ID_WORDWRAP_NONE;
393  }
394 
395  RegCloseKey(hKey);
396 }
397 
399 {
402 }
403 
405 {
406  HKEY hKey;
407  DWORD action = 0;
408 
409  if(registry_get_handle(&hKey, &action, key) == ERROR_SUCCESS)
410  {
411  RegSetValueExW(hKey, var_barstate0, 0, REG_DWORD, (LPBYTE)&barState[index],
412  sizeof(DWORD));
413  RegSetValueExW(hKey, var_wrap, 0, REG_DWORD, (LPBYTE)&wordWrap[index],
414  sizeof(DWORD));
415  RegCloseKey(hKey);
416  }
417 }
418 
420 {
421  registry_set_formatopts(reg_formatindex(SF_RTF), key_rtf, barState, wordWrap);
423 }
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
LONG WINAPI RegCloseKey(IN HKEY hKey)
Definition: registry.c:512
#define ID_FILE_RECENT1
Definition: wordpad.h:33
void registry_set_filelist(LPCWSTR newFile, HWND hMainWnd)
Definition: registry.c:269
#define MFT_STRING
Definition: winuser.h:741
#define MIIM_FTYPE
Definition: winuser.h:724
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 const GLfloat const GLdouble const GLfloat GLenum GLint GLint GLint GLint GLint GLint j
Definition: glfuncs.h:98
#define TRUE
Definition: types.h:120
static DWORD
Definition: registry.c:44
#define ID_WORDWRAP_NONE
Definition: wordpad.h:110
#define MF_BYCOMMAND
Definition: winuser.h:202
struct _WINDOWPLACEMENT WINDOWPLACEMENT
#define ERROR_SUCCESS
Definition: deptool.c:10
LONG WINAPI RegCreateKeyExW(IN HKEY hKey, IN LPCWSTR lpSubKey, IN DWORD Reserved, IN LPWSTR lpClass OPTIONAL, IN DWORD dwOptions, IN REGSAM samDesired, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes OPTIONAL, OUT PHKEY phkResult, OUT LPDWORD lpdwDisposition OPTIONAL)
Definition: registry.c:533
#define REG_BINARY
Definition: nt_native.h:1496
#define KEY_READ
Definition: nt_native.h:1023
#define SF_RTF
Definition: richedit.h:721
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define SW_SHOWMAXIMIZED
Definition: winuser.h:767
static const WCHAR key_options[]
Definition: registry.c:31
#define HKEY_CURRENT_USER
Definition: winreg.h:11
#define ID_WORDWRAP_WINDOW
Definition: wordpad.h:111
static const WCHAR key_recentfiles[]
Definition: registry.c:29
static DWORD wordWrap[2]
Definition: wordpad.c:66
void registry_read_maximized(DWORD *bMaximized)
Definition: registry.c:124
#define BANDID_STATUSBAR
Definition: wordpad.h:97
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
static DWORD barState[2]
Definition: wordpad.c:67
GLuint buffer
Definition: glext.h:5915
LPWSTR dwTypeData
Definition: winuser.h:3211
static MONITORINFO mi
Definition: win.c:7331
#define BANDID_TOOLBAR
Definition: wordpad.h:94
static void format_filelist_filename(LPWSTR file, LPWSTR out)
Definition: registry.c:150
static void truncate_path(LPWSTR file, LPWSTR out, LPWSTR pos1, LPWSTR pos2)
Definition: registry.c:139
#define REG_OPENED_EXISTING_KEY
Definition: nt_native.h:1085
void registry_set_formatopts_all(DWORD barState[], DWORD wordWrap[])
Definition: registry.c:419
#define BANDID_FORMATBAR
Definition: wordpad.h:95
#define WCHAR
Definition: msvc.h:43
void registry_set_options(HWND hMainWnd)
Definition: registry.c:83
#define lstrlenW
Definition: compat.h:407
LONG WINAPI RegSetValueExW(IN HKEY hKey, IN LPCWSTR lpValueName OPTIONAL, IN ULONG Reserved, IN ULONG dwType, IN const UCHAR *lpData, IN ULONG cbData)
Definition: registry.c:656
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
static const WCHAR var_barstate0[]
Definition: registry.c:38
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
UINT_PTR WPARAM
Definition: windef.h:207
struct tagRECT RECT
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define BANDID_RULER
Definition: wordpad.h:96
unsigned char * LPBYTE
Definition: typedefs.h:52
static const WCHAR key_rtf[]
Definition: registry.c:33
LPWSTR file_basename(LPWSTR path)
Definition: wordpad.c:211
long LONG
Definition: pedump.c:60
void registry_set_previewpages(HKEY hKey)
Definition: print.c:99
#define ID_FILE_EXIT
Definition: resource.h:47
smooth NULL
Definition: ftsmooth.c:416
GLuint index
Definition: glext.h:6031
BOOL WINAPI GetWindowPlacement(_In_ HWND, _Inout_ WINDOWPLACEMENT *)
#define MIIM_ID
Definition: winuser.h:717
#define SF_TEXT
Definition: richedit.h:720
#define REG_OPTION_NON_VOLATILE
Definition: nt_native.h:1057
#define KEY_WRITE
Definition: nt_native.h:1031
static const WCHAR key_settings[]
Definition: registry.c:32
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)
unsigned int BOOL
Definition: ntddk_ex.h:94
GLsizeiptr size
Definition: glext.h:5919
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define FILELIST_ENTRIES
Definition: wordpad.h:91
static const WCHAR var_framerect[]
Definition: registry.c:37
void registry_read_previewpages(HKEY hKey)
Definition: print.c:105
#define ID_FILE_RECENT_SEPARATOR
Definition: wordpad.h:37
#define MAX_PATH
Definition: compat.h:26
static FILE * out
Definition: regtests2xml.c:44
unsigned long DWORD
Definition: ntddk_ex.h:95
#define MFT_SEPARATOR
Definition: winuser.h:739
void registry_read_pagemargins(HKEY hKey)
Definition: print.c:90
int ret
HWND hMainWnd
Definition: magnifier.c:33
#define index(s, c)
Definition: various.h:29
static const WCHAR var_maximized[]
Definition: registry.c:40
static void registry_set_formatopts(int index, LPCWSTR key, DWORD barState[], DWORD wordWrap[])
Definition: registry.c:404
static void registry_read_formatopts(int index, LPCWSTR key, DWORD barState[], DWORD wordWrap[])
Definition: registry.c:355
static const WCHAR key_text[]
Definition: registry.c:34
static const WCHAR var_wrap[]
Definition: registry.c:39
unsigned char BYTE
Definition: ntddk_ex.h:96
static LRESULT registry_get_handle(HKEY *hKey, LPDWORD action, LPCWSTR subKey)
Definition: registry.c:42
LONG WINAPI RegQueryValueExW(IN HKEY hKey, IN LPCWSTR lpValueName, IN PULONG lpReserved, OUT PULONG lpType OPTIONAL, OUT PUCHAR lpData OPTIONAL, IN OUT PULONG lpcbData OPTIONAL)
Definition: registry.c:862
#define MIIM_STRING
Definition: winuser.h:722
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
const WCHAR * action
Definition: action.c:7779
#define lstrcpyW
Definition: compat.h:406
static const WCHAR var_file[]
Definition: registry.c:36
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
BOOL WINAPI InsertMenuItemW(_In_ HMENU, _In_ UINT, _In_ BOOL, _In_ LPCMENUITEMINFOW)
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
RECT rcNormalPosition
Definition: winuser.h:3237
#define CSIDL_PERSONAL
Definition: shlobj.h:1993
HRESULT WINAPI SHGetFolderPathW(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath)
Definition: shellpath.c:2085
#define FILELIST_ENTRY_LENGTH
Definition: wordpad.h:92
uint32_t * LPDWORD
Definition: typedefs.h:57
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3381
#define ULONG_PTR
Definition: config.h:101
void registry_set_pagemargins(HKEY hKey)
Definition: print.c:85
void registry_read_winrect(RECT *rc)
Definition: registry.c:111
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define MIIM_DATA
Definition: winuser.h:721
LONG_PTR LRESULT
Definition: windef.h:209
void registry_read_filelist(HWND hMainWnd)
Definition: registry.c:217
#define REG_DWORD
Definition: sdbapi.c:539
HMENU WINAPI GetMenu(_In_ HWND)
ULONG_PTR dwItemData
Definition: winuser.h:3210
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
struct tagMENUITEMINFOW MENUITEMINFOW
#define HeapFree(x, y, z)
Definition: compat.h:394
void registry_read_options(void)
Definition: registry.c:335
void registry_read_formatopts_all(DWORD barState[], DWORD wordWrap[])
Definition: registry.c:398
Definition: path.c:42
int reg_formatindex(WPARAM format)
Definition: registry.c:330
Definition: fci.c:126
#define REG_SZ
Definition: layer.c:22