Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
27f0f800
Commit
27f0f800
authored
Apr 20, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Load system.reg and userdef.reg at server init time.
parent
062c18dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
33 deletions
+30
-33
registry.c
server/registry.c
+30
-33
No files found.
server/registry.c
View file @
27f0f800
...
...
@@ -1424,15 +1424,42 @@ static void load_init_registry_from_file( const char *filename, struct key *key
/* load the user registry files */
static
void
load_user_registries
(
struct
key
*
key_current_user
)
{
const
char
*
config
=
wine_get_config_dir
();
char
*
filename
;
/* load user.reg into HKEY_CURRENT_USER */
if
(
!
(
filename
=
mem_alloc
(
strlen
(
config
)
+
sizeof
(
"/user.reg"
)
)))
return
;
strcpy
(
filename
,
config
);
strcat
(
filename
,
"/user.reg"
);
load_init_registry_from_file
(
filename
,
key_current_user
);
free
(
filename
);
/* start the periodic save timer */
set_periodic_save_timer
();
}
/* registry initialisation */
void
init_registry
(
void
)
{
static
const
WCHAR
root_name
[]
=
{
0
};
static
const
WCHAR
HKLM
[]
=
{
'M'
,
'a'
,
'c'
,
'h'
,
'i'
,
'n'
,
'e'
};
static
const
WCHAR
HKU_default
[]
=
{
'U'
,
's'
,
'e'
,
'r'
,
'\\'
,
'.'
,
'D'
,
'e'
,
'f'
,
'a'
,
'u'
,
'l'
,
't'
};
static
const
WCHAR
config_name
[]
=
{
'M'
,
'a'
,
'c'
,
'h'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'C'
,
'o'
,
'n'
,
'f'
,
'i'
,
'g'
,
0
};
const
char
*
config
=
wine_get_config_dir
();
char
*
p
,
*
filename
;
struct
key
*
key
;
int
dummy
;
if
(
!
(
filename
=
mem_alloc
(
strlen
(
config
)
+
16
)))
return
;
/* create the root key */
root_key
=
alloc_key
(
root_name
,
time
(
NULL
)
);
assert
(
root_key
);
/* load the config file */
if
(
!
(
filename
=
malloc
(
strlen
(
config
)
+
16
)))
fatal_error
(
"out of memory
\n
"
);
strcpy
(
filename
,
config
);
p
=
filename
+
strlen
(
filename
);
...
...
@@ -1456,44 +1483,14 @@ static void load_user_registries( struct key *key_current_user )
load_init_registry_from_file
(
filename
,
key
);
release_object
(
key
);
/* load user.reg into HKEY_CURRENT_USER */
strcpy
(
p
,
"/user.reg"
);
load_init_registry_from_file
(
filename
,
key_current_user
);
free
(
filename
);
/* start the periodic save timer */
set_periodic_save_timer
();
}
/* registry initialisation */
void
init_registry
(
void
)
{
static
const
WCHAR
root_name
[]
=
{
0
};
static
const
WCHAR
config_name
[]
=
{
'M'
,
'a'
,
'c'
,
'h'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'C'
,
'o'
,
'n'
,
'f'
,
'i'
,
'g'
,
0
};
const
char
*
config
=
wine_get_config_dir
();
char
*
filename
;
struct
key
*
key
;
int
dummy
;
/* create the root key */
root_key
=
alloc_key
(
root_name
,
time
(
NULL
)
);
assert
(
root_key
);
/* load the config file */
if
(
!
(
filename
=
malloc
(
strlen
(
config
)
+
sizeof
(
"/config"
)
)))
fatal_error
(
"out of memory
\n
"
);
strcpy
(
filename
,
config
);
strcat
(
filename
,
"/config"
);
/* load config into Registry\Machine\Software\Wine\Wine\Config */
if
(
!
(
key
=
create_key
(
root_key
,
copy_path
(
config_name
,
sizeof
(
config_name
),
0
),
NULL
,
0
,
time
(
NULL
),
&
dummy
)))
fatal_error
(
"could not create Config registry key
\n
"
);
key
->
flags
|=
KEY_VOLATILE
;
strcpy
(
p
,
"/config"
);
load_init_registry_from_file
(
filename
,
key
);
release_object
(
key
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment