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
ce335add
Commit
ce335add
authored
Jul 30, 2004
by
Mike Hearn
Committed by
Alexandre Julliard
Jul 30, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't marshal IClassFactory into the local server pipe until we have
connected, otherwise we might end up with stubs that are never used.
parent
6545d994
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
32 deletions
+43
-32
compobj.c
dlls/ole32/compobj.c
+43
-32
No files found.
dlls/ole32/compobj.c
View file @
ce335add
...
...
@@ -1061,41 +1061,10 @@ _LocalServerThread(LPVOID param) {
ULONG
res
;
TRACE
(
"Starting threader for %s.
\n
"
,
debugstr_guid
(
&
newClass
->
classIdentifier
));
strcpy
(
pipefn
,
PIPEPREF
);
WINE_StringFromCLSID
(
&
newClass
->
classIdentifier
,
pipefn
+
strlen
(
PIPEPREF
));
hres
=
IUnknown_QueryInterface
(
newClass
->
classObject
,
&
IID_IClassFactory
,(
LPVOID
*
)
&
classfac
);
if
(
hres
)
return
hres
;
hres
=
CreateStreamOnHGlobal
(
0
,
TRUE
,
&
pStm
);
if
(
hres
)
{
FIXME
(
"Failed to create stream on hglobal.
\n
"
);
return
hres
;
}
hres
=
CoMarshalInterface
(
pStm
,
&
IID_IClassFactory
,(
LPVOID
)
classfac
,
0
,
NULL
,
0
);
if
(
hres
)
{
FIXME
(
"CoMarshalInterface failed, %lx!
\n
"
,
hres
);
return
hres
;
}
hres
=
IStream_Stat
(
pStm
,
&
ststg
,
0
);
if
(
hres
)
return
hres
;
buflen
=
ststg
.
cbSize
.
u
.
LowPart
;
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
buflen
);
seekto
.
u
.
LowPart
=
0
;
seekto
.
u
.
HighPart
=
0
;
hres
=
IStream_Seek
(
pStm
,
seekto
,
SEEK_SET
,
&
newpos
);
if
(
hres
)
{
FIXME
(
"IStream_Seek failed, %lx
\n
"
,
hres
);
return
hres
;
}
hres
=
IStream_Read
(
pStm
,
buffer
,
buflen
,
&
res
);
if
(
hres
)
{
FIXME
(
"Stream Read failed, %lx
\n
"
,
hres
);
return
hres
;
}
IStream_Release
(
pStm
);
hPipe
=
CreateNamedPipeA
(
pipefn
,
PIPE_ACCESS_DUPLEX
,
PIPE_TYPE_BYTE
|
PIPE_WAIT
,
PIPE_UNLIMITED_INSTANCES
,
4096
,
4096
,
NMPWAIT_USE_DEFAULT_WAIT
,
NULL
);
...
...
@@ -1108,9 +1077,51 @@ _LocalServerThread(LPVOID param) {
ERR
(
"Failure during ConnectNamedPipe %lx, ABORT!
\n
"
,
GetLastError
());
break
;
}
TRACE
(
"marshalling IClassFactory to client
\n
"
);
hres
=
IUnknown_QueryInterface
(
newClass
->
classObject
,
&
IID_IClassFactory
,(
LPVOID
*
)
&
classfac
);
if
(
hres
)
return
hres
;
hres
=
CreateStreamOnHGlobal
(
0
,
TRUE
,
&
pStm
);
if
(
hres
)
{
FIXME
(
"Failed to create stream on hglobal.
\n
"
);
return
hres
;
}
hres
=
CoMarshalInterface
(
pStm
,
&
IID_IClassFactory
,(
LPVOID
)
classfac
,
0
,
NULL
,
0
);
if
(
hres
)
{
FIXME
(
"CoMarshalInterface failed, %lx!
\n
"
,
hres
);
return
hres
;
}
IUnknown_Release
(
classfac
);
/* is this right? */
hres
=
IStream_Stat
(
pStm
,
&
ststg
,
0
);
if
(
hres
)
return
hres
;
buflen
=
ststg
.
cbSize
.
u
.
LowPart
;
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
buflen
);
seekto
.
u
.
LowPart
=
0
;
seekto
.
u
.
HighPart
=
0
;
hres
=
IStream_Seek
(
pStm
,
seekto
,
SEEK_SET
,
&
newpos
);
if
(
hres
)
{
FIXME
(
"IStream_Seek failed, %lx
\n
"
,
hres
);
return
hres
;
}
hres
=
IStream_Read
(
pStm
,
buffer
,
buflen
,
&
res
);
if
(
hres
)
{
FIXME
(
"Stream Read failed, %lx
\n
"
,
hres
);
return
hres
;
}
IStream_Release
(
pStm
);
WriteFile
(
hPipe
,
buffer
,
buflen
,
&
res
,
NULL
);
FlushFileBuffers
(
hPipe
);
DisconnectNamedPipe
(
hPipe
);
TRACE
(
"done marshalling IClassFactory
\n
"
);
}
CloseHandle
(
hPipe
);
return
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