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
c9fda6fa
Commit
c9fda6fa
authored
Mar 25, 2003
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 25, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No longer using kernel32's APIs but ntdll's.
parent
7a911920
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
7 deletions
+25
-7
registry.c
misc/registry.c
+25
-7
No files found.
misc/registry.c
View file @
c9fda6fa
...
...
@@ -1340,6 +1340,10 @@ static LPSTR _convert_winnt_registry_to_wine_format(LPCWSTR fn, int level)
LPSTR
ret
=
NULL
;
HANDLE
hFile
;
HANDLE
hMapping
;
OBJECT_ATTRIBUTES
attr
;
LARGE_INTEGER
lg_int
;
NTSTATUS
nts
;
SIZE_T
len
;
nt_regf
*
regf
;
nt_hbin
*
hbin
;
...
...
@@ -1350,11 +1354,25 @@ static LPSTR _convert_winnt_registry_to_wine_format(LPCWSTR fn, int level)
hFile
=
CreateFileW
(
fn
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
if
(
hFile
==
INVALID_HANDLE_VALUE
)
return
NULL
;
hMapping
=
CreateFileMappingW
(
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
;
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
0
;
attr
.
ObjectName
=
NULL
;
attr
.
Attributes
=
0
;
attr
.
SecurityDescriptor
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
lg_int
.
QuadPart
=
0
;
nts
=
NtCreateSection
(
&
hMapping
,
STANDARD_RIGHTS_REQUIRED
|
SECTION_QUERY
|
SECTION_MAP_READ
,
&
attr
,
&
lg_int
,
PAGE_READONLY
,
SEC_COMMIT
,
hFile
);
if
(
nts
!=
STATUS_SUCCESS
)
goto
error1
;
base
=
NULL
;
len
=
0
;
nts
=
NtMapViewOfSection
(
hMapping
,
GetCurrentProcess
(),
&
base
,
0
,
0
,
&
lg_int
,
&
len
,
ViewShare
,
0
,
FILE_MAP_READ
);
NtClose
(
hMapping
);
if
(
nts
!=
STATUS_SUCCESS
)
goto
error1
;
/* control signature */
if
(
*
(
LPDWORD
)
base
!=
NT_REG_HEADER_BLOCK_ID
)
{
...
...
@@ -1393,9 +1411,9 @@ static LPSTR _convert_winnt_registry_to_wine_format(LPCWSTR fn, int level)
fclose
(
f
);
error:
UnmapViewOfFile
(
base
);
NtUnmapViewOfSection
(
GetCurrentProcess
(),
base
);
error1:
CloseHandl
e
(
hFile
);
NtClos
e
(
hFile
);
return
ret
;
}
...
...
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