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
5a559f18
Commit
5a559f18
authored
May 20, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Don't continue to wait for a local server if the process has terminated.
parent
1ab83018
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
rpc.c
dlls/ole32/rpc.c
+13
-4
No files found.
dlls/ole32/rpc.c
View file @
5a559f18
...
...
@@ -1637,7 +1637,7 @@ void RPC_StartRemoting(struct apartment *apt)
}
static
HRESULT
create_server
(
REFCLSID
rclsid
)
static
HRESULT
create_server
(
REFCLSID
rclsid
,
HANDLE
*
process
)
{
static
const
WCHAR
wszLocalServer32
[]
=
{
'L'
,
'o'
,
'c'
,
'a'
,
'l'
,
'S'
,
'e'
,
'r'
,
'v'
,
'e'
,
'r'
,
'3'
,
'2'
,
0
};
static
const
WCHAR
embedding
[]
=
{
' '
,
'-'
,
'E'
,
'm'
,
'b'
,
'e'
,
'd'
,
'd'
,
'i'
,
'n'
,
'g'
,
0
};
...
...
@@ -1676,7 +1676,7 @@ static HRESULT create_server(REFCLSID rclsid)
WARN
(
"failed to run local server %s
\n
"
,
debugstr_w
(
command
));
return
HRESULT_FROM_WIN32
(
GetLastError
());
}
CloseHandle
(
pinfo
.
hProcess
)
;
*
process
=
pinfo
.
hProcess
;
CloseHandle
(
pinfo
.
hThread
);
return
S_OK
;
...
...
@@ -1813,9 +1813,10 @@ HRESULT RPC_GetLocalClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
if
(
hPipe
==
INVALID_HANDLE_VALUE
)
{
DWORD
index
;
DWORD
start_ticks
;
HANDLE
process
=
0
;
if
(
tries
==
1
)
{
if
(
(
hres
=
create_local_service
(
rclsid
))
&&
(
hres
=
create_server
(
rclsid
))
)
(
hres
=
create_server
(
rclsid
,
&
process
))
)
return
hres
;
}
else
{
WARN
(
"Connecting to %s, no response yet, retrying: le is %u
\n
"
,
debugstr_w
(
pipefn
),
GetLastError
());
...
...
@@ -1823,8 +1824,16 @@ HRESULT RPC_GetLocalClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
/* wait for one second, even if messages arrive */
start_ticks
=
GetTickCount
();
do
{
CoWaitForMultipleHandles
(
0
,
1000
,
0
,
NULL
,
&
index
);
if
(
SUCCEEDED
(
CoWaitForMultipleHandles
(
0
,
1000
,
(
process
!=
0
),
&
process
,
&
index
))
&&
process
&&
!
index
)
{
WARN
(
"server for %s failed to start
\n
"
,
debugstr_guid
(
rclsid
)
);
CloseHandle
(
hPipe
);
CloseHandle
(
process
);
return
E_NOINTERFACE
;
}
}
while
(
GetTickCount
()
-
start_ticks
<
1000
);
if
(
process
)
CloseHandle
(
process
);
continue
;
}
bufferlen
=
0
;
...
...
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