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)
...
@@ -623,10 +623,9 @@ static HRESULT create_server(REFCLSID rclsid)
static
const
WCHAR
embedding
[]
=
{
' '
,
'-'
,
'E'
,
'm'
,
'b'
,
'e'
,
'd'
,
'd'
,
'i'
,
'n'
,
'g'
,
0
};
static
const
WCHAR
embedding
[]
=
{
' '
,
'-'
,
'E'
,
'm'
,
'b'
,
'e'
,
'd'
,
'd'
,
'i'
,
'n'
,
'g'
,
0
};
HKEY
hkeyclsid
;
HKEY
hkeyclsid
;
HKEY
key
;
HKEY
key
;
HRESULT
hres
=
E_UNEXPECTED
;
HRESULT
hres
;
WCHAR
exe
[
MAX_PATH
+
1
];
DWORD
exelen
=
sizeof
(
exe
);
WCHAR
command
[
MAX_PATH
+
sizeof
(
embedding
)
/
sizeof
(
WCHAR
)];
WCHAR
command
[
MAX_PATH
+
sizeof
(
embedding
)
/
sizeof
(
WCHAR
)];
DWORD
size
=
MAX_PATH
+
1
*
sizeof
(
WCHAR
);
STARTUPINFOW
sinfo
;
STARTUPINFOW
sinfo
;
PROCESS_INFORMATION
pinfo
;
PROCESS_INFORMATION
pinfo
;
...
@@ -637,14 +636,14 @@ static HRESULT create_server(REFCLSID rclsid)
...
@@ -637,14 +636,14 @@ static HRESULT create_server(REFCLSID rclsid)
}
}
hres
=
RegOpenKeyExW
(
hkeyclsid
,
wszLocalServer32
,
0
,
KEY_READ
,
&
key
);
hres
=
RegOpenKeyExW
(
hkeyclsid
,
wszLocalServer32
,
0
,
KEY_READ
,
&
key
);
RegCloseKey
(
hkeyclsid
);
if
(
hres
!=
ERROR_SUCCESS
)
{
if
(
hres
!=
ERROR_SUCCESS
)
{
WARN
(
"class %s not registered as LocalServer32
\n
"
,
debugstr_guid
(
rclsid
));
WARN
(
"class %s not registered as LocalServer32
\n
"
,
debugstr_guid
(
rclsid
));
return
REGDB_E_READREGDB
;
/* Probably */
return
REGDB_E_READREGDB
;
/* Probably */
}
}
memset
(
exe
,
0
,
sizeof
(
exe
));
hres
=
RegQueryValueExW
(
key
,
NULL
,
NULL
,
NULL
,
(
LPBYTE
)
command
,
&
size
);
hres
=
RegQueryValueExW
(
key
,
NULL
,
NULL
,
NULL
,
(
LPBYTE
)
exe
,
&
exelen
);
RegCloseKey
(
key
);
RegCloseKey
(
key
);
if
(
hres
)
{
if
(
hres
)
{
WARN
(
"No default value for LocalServer32 key
\n
"
);
WARN
(
"No default value for LocalServer32 key
\n
"
);
...
@@ -654,17 +653,16 @@ static HRESULT create_server(REFCLSID rclsid)
...
@@ -654,17 +653,16 @@ static HRESULT create_server(REFCLSID rclsid)
memset
(
&
sinfo
,
0
,
sizeof
(
sinfo
));
memset
(
&
sinfo
,
0
,
sizeof
(
sinfo
));
sinfo
.
cb
=
sizeof
(
sinfo
);
sinfo
.
cb
=
sizeof
(
sinfo
);
/* EXE servers are started with the -Embedding switch. MSDN also claims /Embedding is used,
/* EXE servers are started with the -Embedding switch. */
* 9x does -Embedding, perhaps an 9x/NT difference?
*/
strcpyW
(
command
,
exe
);
strcatW
(
command
,
embedding
);
strcatW
(
command
,
embedding
);
TRACE
(
"activating local server %s for %s
\n
"
,
debugstr_w
(
command
),
debugstr_guid
(
rclsid
));
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
))
{
/* FIXME: Win2003 supports a ServerExecutable value that is passed into
WARN
(
"failed to run local server %s
\n
"
,
debugstr_w
(
exe
));
* 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
());
return
HRESULT_FROM_WIN32
(
GetLastError
());
}
}
CloseHandle
(
pinfo
.
hProcess
);
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