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
65581b84
Commit
65581b84
authored
Nov 08, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Nov 08, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
We shouldn't pass the application name into CreateProcess because the
value stored in the registry could include arguments.
parent
f4e290ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
rpc.c
dlls/ole32/rpc.c
+9
-11
No files found.
dlls/ole32/rpc.c
View file @
65581b84
...
...
@@ -623,10 +623,9 @@ static HRESULT create_server(REFCLSID rclsid)
static
const
WCHAR
embedding
[]
=
{
' '
,
'-'
,
'E'
,
'm'
,
'b'
,
'e'
,
'd'
,
'd'
,
'i'
,
'n'
,
'g'
,
0
};
HKEY
hkeyclsid
;
HKEY
key
;
HRESULT
hres
=
E_UNEXPECTED
;
WCHAR
exe
[
MAX_PATH
+
1
];
DWORD
exelen
=
sizeof
(
exe
);
HRESULT
hres
;
WCHAR
command
[
MAX_PATH
+
sizeof
(
embedding
)
/
sizeof
(
WCHAR
)];
DWORD
size
=
MAX_PATH
+
1
*
sizeof
(
WCHAR
);
STARTUPINFOW
sinfo
;
PROCESS_INFORMATION
pinfo
;
...
...
@@ -637,14 +636,14 @@ static HRESULT create_server(REFCLSID rclsid)
}
hres
=
RegOpenKeyExW
(
hkeyclsid
,
wszLocalServer32
,
0
,
KEY_READ
,
&
key
);
RegCloseKey
(
hkeyclsid
);
if
(
hres
!=
ERROR_SUCCESS
)
{
WARN
(
"class %s not registered as LocalServer32
\n
"
,
debugstr_guid
(
rclsid
));
return
REGDB_E_READREGDB
;
/* Probably */
}
memset
(
exe
,
0
,
sizeof
(
exe
));
hres
=
RegQueryValueExW
(
key
,
NULL
,
NULL
,
NULL
,
(
LPBYTE
)
exe
,
&
exelen
);
hres
=
RegQueryValueExW
(
key
,
NULL
,
NULL
,
NULL
,
(
LPBYTE
)
command
,
&
size
);
RegCloseKey
(
key
);
if
(
hres
)
{
WARN
(
"No default value for LocalServer32 key
\n
"
);
...
...
@@ -654,17 +653,16 @@ static HRESULT create_server(REFCLSID rclsid)
memset
(
&
sinfo
,
0
,
sizeof
(
sinfo
));
sinfo
.
cb
=
sizeof
(
sinfo
);
/* EXE servers are started with the -Embedding switch. MSDN also claims /Embedding is used,
* 9x does -Embedding, perhaps an 9x/NT difference?
*/
/* EXE servers are started with the -Embedding switch. */
strcpyW
(
command
,
exe
);
strcatW
(
command
,
embedding
);
TRACE
(
"activating local server %s for %s
\n
"
,
debugstr_w
(
command
),
debugstr_guid
(
rclsid
));
if
(
!
CreateProcessW
(
exe
,
command
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
sinfo
,
&
pinfo
))
{
WARN
(
"failed to run local server %s
\n
"
,
debugstr_w
(
exe
));
/* FIXME: Win2003 supports a ServerExecutable value that is passed into
* CreateProcess */
if
(
!
CreateProcessW
(
NULL
,
command
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
sinfo
,
&
pinfo
))
{
WARN
(
"failed to run local server %s
\n
"
,
debugstr_w
(
command
));
return
HRESULT_FROM_WIN32
(
GetLastError
());
}
CloseHandle
(
pinfo
.
hProcess
);
...
...
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