Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e75d5b8d
Commit
e75d5b8d
authored
Feb 10, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Initialize COM if necessary when registering DLLs.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e0b5da7b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
install.c
dlls/setupapi/install.c
+14
-0
install.c
dlls/setupapi/tests/install.c
+1
-1
No files found.
dlls/setupapi/install.c
View file @
e75d5b8d
...
...
@@ -1125,6 +1125,7 @@ BOOL WINAPI SetupInstallFromInfSectionW( HWND owner, HINF hinf, PCWSTR section,
if
(
flags
&
SPINST_REGSVR
)
{
struct
register_dll_info
info
;
HRESULT
hr
;
info
.
unregister
=
FALSE
;
info
.
modules_size
=
0
;
...
...
@@ -1142,14 +1143,21 @@ BOOL WINAPI SetupInstallFromInfSectionW( HWND owner, HINF hinf, PCWSTR section,
else
return
FALSE
;
hr
=
CoInitialize
(
NULL
);
ret
=
iterate_section_fields
(
hinf
,
section
,
RegisterDlls
,
register_dlls_callback
,
&
info
);
for
(
i
=
0
;
i
<
info
.
modules_count
;
i
++
)
FreeLibrary
(
info
.
modules
[
i
]
);
if
(
SUCCEEDED
(
hr
))
CoUninitialize
();
HeapFree
(
GetProcessHeap
(),
0
,
info
.
modules
);
if
(
!
ret
)
return
FALSE
;
}
if
(
flags
&
SPINST_UNREGSVR
)
{
struct
register_dll_info
info
;
HRESULT
hr
;
info
.
unregister
=
TRUE
;
info
.
modules_size
=
0
;
...
...
@@ -1162,8 +1170,14 @@ BOOL WINAPI SetupInstallFromInfSectionW( HWND owner, HINF hinf, PCWSTR section,
}
else
info
.
callback
=
NULL
;
hr
=
CoInitialize
(
NULL
);
ret
=
iterate_section_fields
(
hinf
,
section
,
UnregisterDlls
,
register_dlls_callback
,
&
info
);
for
(
i
=
0
;
i
<
info
.
modules_count
;
i
++
)
FreeLibrary
(
info
.
modules
[
i
]
);
if
(
SUCCEEDED
(
hr
))
CoUninitialize
();
HeapFree
(
GetProcessHeap
(),
0
,
info
.
modules
);
if
(
!
ret
)
return
FALSE
;
}
...
...
dlls/setupapi/tests/install.c
View file @
e75d5b8d
...
...
@@ -2092,7 +2092,7 @@ static void test_register_dlls(void)
ok
(
ret
,
"Failed to install, error %#x.
\n
"
,
GetLastError
());
l
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
"winetest_setupapi_selfreg"
,
&
key
);
todo_wine
ok
(
!
l
,
"Got error %u.
\n
"
,
l
);
ok
(
!
l
,
"Got error %u.
\n
"
,
l
);
RegCloseKey
(
key
);
ret
=
SetupInstallFromInfSectionA
(
NULL
,
hinf
,
"DefaultInstall"
,
SPINST_UNREGSVR
,
...
...
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