Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Felix Münchhalfen
wine
Commits
7c682525
Commit
7c682525
authored
22 years ago
by
Juergen Schmied
Committed by
Alexandre Julliard
22 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use only winapi functions in _convert_winnt_registry_to_wine_format.
parent
c5d30535
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc/registry.c
+13
-11
13 additions, 11 deletions
misc/registry.c
with
13 additions
and
11 deletions
misc/registry.c
+
13
−
11
View file @
7c682525
...
...
@@ -948,6 +948,7 @@ static int _nt_dump_nk(LPSTR key_name,char *base,nt_nk *nk,FILE *f,int level)
DWORD
*
vl
;
LPSTR
new_key_name
=
NULL
;
TRACE
(
"%s
\n
"
,
key_name
);
if
(
nk
->
SubBlockId
!=
NT_REG_KEY_BLOCK_ID
)
{
ERR
(
"unknown node id 0x%04x, please report!
\n
"
,
nk
->
SubBlockId
);
...
...
@@ -1333,25 +1334,26 @@ error1:
/* convert winnt native registry file to wine format [Internal] */
static
LPSTR
_convert_winnt_registry_to_wine_format
(
LPCSTR
fn
,
int
level
)
{
int
fd
;
FILE
*
f
;
DOS_FULL_NAME
full_name
;
void
*
base
;
LPSTR
ret
=
NULL
;
struct
stat
st
;
HANDLE
hFile
;
HANDLE
hMapping
;
nt_regf
*
regf
;
nt_hbin
*
hbin
;
nt_hbin_sub
*
hbin_sub
;
nt_nk
*
nk
;
if
(
!
DOSFS_GetFullName
(
fn
,
0
,
&
full_name
))
return
NULL
;
TRACE
(
"%s
\n
"
,
fn
)
;
/* map the registry into the memory */
if
((
fd
=
open
(
full_name
.
long_name
,
O_RDONLY
|
O_NONBLOCK
))
==
-
1
)
return
NULL
;
if
((
fstat
(
fd
,
&
st
)
==
-
1
))
goto
error1
;
if
(
!
st
.
st_size
)
goto
error1
;
if
((
base
=
mmap
(
NULL
,
st
.
st_size
,
PROT_READ
,
MAP_PRIVATE
,
fd
,
0
))
==
MAP_FAILED
)
goto
error1
;
hFile
=
CreateFileA
(
fn
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
if
(
hFile
==
INVALID_HANDLE_VALUE
)
return
NULL
;
hMapping
=
CreateFileMappingA
(
hFile
,
NULL
,
PAGE_READONLY
|
SEC_COMMIT
,
0
,
0
,
NULL
);
if
(
!
hMapping
)
goto
error1
;
base
=
MapViewOfFile
(
hMapping
,
FILE_MAP_READ
,
0
,
0
,
0
);
CloseHandle
(
hMapping
);
if
(
!
base
)
goto
error1
;
/* control signature */
if
(
*
(
LPDWORD
)
base
!=
NT_REG_HEADER_BLOCK_ID
)
{
...
...
@@ -1389,9 +1391,9 @@ static LPSTR _convert_winnt_registry_to_wine_format(LPCSTR fn,int level)
fclose
(
f
);
error:
mu
nmap
(
base
,
st
.
st_size
);
U
nmap
ViewOfFile
(
base
);
error1:
c
lose
(
fd
);
C
lose
Handle
(
hFile
);
return
ret
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment