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
86d63bbb
Commit
86d63bbb
authored
Jan 07, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Jan 07, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename iid in wine_marshal_id to ipid and use IPIDs instead of IIDs in
the stub manager.
parent
09000336
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
25 deletions
+28
-25
compobj_private.h
dlls/ole32/compobj_private.h
+7
-6
marshal.c
dlls/ole32/marshal.c
+11
-10
stubmanager.c
dlls/ole32/stubmanager.c
+10
-9
No files found.
dlls/ole32/compobj_private.h
View file @
86d63bbb
...
...
@@ -124,7 +124,7 @@ extern void* StdGlobalInterfaceTableInstance;
typedef
struct
_wine_marshal_id
{
OXID
oxid
;
/* id of apartment */
OID
oid
;
/* id of stub manager */
I
ID
iid
;
/* id of interface (NOT ifptr)
*/
I
PID
ipid
;
/* id of interface pointer
*/
}
wine_marshal_id
;
inline
static
BOOL
...
...
@@ -132,7 +132,7 @@ MARSHAL_Compare_Mids(wine_marshal_id *mid1,wine_marshal_id *mid2) {
return
(
mid1
->
oxid
==
mid2
->
oxid
)
&&
(
mid1
->
oid
==
mid2
->
oid
)
&&
IsEqual
IID
(
&
(
mid1
->
iid
),
&
(
mid2
->
i
id
))
IsEqual
GUID
(
&
(
mid1
->
ipid
),
&
(
mid2
->
ip
id
))
;
}
...
...
@@ -144,7 +144,8 @@ struct ifstub
{
struct
list
entry
;
IRpcStubBuffer
*
stubbuffer
;
IID
iid
;
/* fixme: this should be an IPID not an IID */
IID
iid
;
IPID
ipid
;
IUnknown
*
iface
;
BOOL
table
;
...
...
@@ -168,11 +169,11 @@ struct stub_manager
struct
stub_manager
*
new_stub_manager
(
APARTMENT
*
apt
,
IUnknown
*
object
);
int
stub_manager_ref
(
struct
stub_manager
*
m
,
int
refs
);
int
stub_manager_unref
(
struct
stub_manager
*
m
,
int
refs
);
IRpcStubBuffer
*
stub_manager_i
id_to_stubbuffer
(
struct
stub_manager
*
m
,
I
ID
*
iid
);
struct
ifstub
*
stub_manager_new_ifstub
(
struct
stub_manager
*
m
,
IRpcStubBuffer
*
sb
,
IUnknown
*
iptr
,
IID
*
iid
,
BOOL
tablemarshal
);
IRpcStubBuffer
*
stub_manager_i
pid_to_stubbuffer
(
struct
stub_manager
*
m
,
IP
ID
*
iid
);
struct
ifstub
*
stub_manager_new_ifstub
(
struct
stub_manager
*
m
,
IRpcStubBuffer
*
sb
,
IUnknown
*
iptr
,
REFIID
iid
,
BOOL
tablemarshal
);
struct
stub_manager
*
get_stub_manager
(
OXID
oxid
,
OID
oid
);
struct
stub_manager
*
get_stub_manager_from_object
(
OXID
oxid
,
void
*
object
);
void
stub_manager_delete_ifstub
(
struct
stub_manager
*
m
,
I
ID
*
iid
);
/* fixme: should be ipid */
void
stub_manager_delete_ifstub
(
struct
stub_manager
*
m
,
I
PID
*
ipid
);
IRpcStubBuffer
*
mid_to_stubbuffer
(
wine_marshal_id
*
mid
);
...
...
dlls/ole32/marshal.c
View file @
86d63bbb
...
...
@@ -91,12 +91,11 @@ IRpcStubBuffer *mid_to_stubbuffer(wine_marshal_id *mid)
return
NULL
;
}
return
stub_manager_i
id_to_stubbuffer
(
m
,
&
mid
->
i
id
);
return
stub_manager_i
pid_to_stubbuffer
(
m
,
&
mid
->
ip
id
);
}
/* fixme: this should return an IPID */
/* creates a new stub manager and sets mid->oid when mid->oid == 0 */
static
HRESULT
register_ifstub
(
wine_marshal_id
*
mid
,
IUnknown
*
obj
,
IRpcStubBuffer
*
stub
,
BOOL
tablemarshal
)
static
HRESULT
register_ifstub
(
wine_marshal_id
*
mid
,
REFIID
riid
,
IUnknown
*
obj
,
IRpcStubBuffer
*
stub
,
BOOL
tablemarshal
)
{
struct
stub_manager
*
manager
=
NULL
;
struct
ifstub
*
ifstub
;
...
...
@@ -123,9 +122,12 @@ static HRESULT register_ifstub(wine_marshal_id *mid, IUnknown *obj, IRpcStubBuff
mid
->
oid
=
manager
->
oid
;
}
ifstub
=
stub_manager_new_ifstub
(
manager
,
stub
,
obj
,
&
mid
->
iid
,
tablemarshal
);
ifstub
=
stub_manager_new_ifstub
(
manager
,
stub
,
obj
,
riid
,
tablemarshal
);
if
(
!
ifstub
)
return
E_OUTOFMEMORY
;
return
ifstub
?
S_OK
:
E_OUTOFMEMORY
;
mid
->
ipid
=
ifstub
->
ipid
;
return
S_OK
;
}
...
...
@@ -502,7 +504,6 @@ StdMarshalImpl_MarshalInterface(
/* now fill out the MID */
mid
.
oxid
=
COM_CurrentApt
()
->
oxid
;
memcpy
(
&
mid
.
iid
,
riid
,
sizeof
(
mid
.
iid
));
IUnknown_QueryInterface
((
LPUNKNOWN
)
pv
,
riid
,
(
LPVOID
*
)
&
pUnk
);
...
...
@@ -515,7 +516,7 @@ StdMarshalImpl_MarshalInterface(
mid
.
oid
=
0
;
/* will be set by register_ifstub */
}
hres
=
register_ifstub
(
&
mid
,
pUnk
,
stubbuffer
,
tablemarshal
);
hres
=
register_ifstub
(
&
mid
,
riid
,
pUnk
,
stubbuffer
,
tablemarshal
);
IUnknown_Release
(
pUnk
);
...
...
@@ -568,7 +569,7 @@ StdMarshalImpl_UnmarshalInterface(LPMARSHAL iface, IStream *pStm, REFIID riid, v
FIXME
(
"table marshalling unimplemented
\n
"
);
/* clean up the stubs */
stub_manager_delete_ifstub
(
stubmgr
,
&
mid
.
iid
);
stub_manager_delete_ifstub
(
stubmgr
,
&
mid
.
i
p
id
);
stub_manager_unref
(
stubmgr
,
1
);
return
hres
;
}
...
...
@@ -587,7 +588,7 @@ StdMarshalImpl_UnmarshalInterface(LPMARSHAL iface, IStream *pStm, REFIID riid, v
if
(
hres
==
S_OK
)
IUnknown_AddRef
((
IUnknown
*
)
ifproxy
->
iface
);
else
if
(
hres
==
E_NOINTERFACE
)
hres
=
proxy_manager_create_ifproxy
(
proxy_manager
,
mid
.
i
id
/* FIXME: ipid */
,
riid
,
1
,
&
ifproxy
);
hres
=
proxy_manager_create_ifproxy
(
proxy_manager
,
mid
.
i
pid
,
riid
,
1
,
&
ifproxy
);
if
(
hres
==
S_OK
)
*
ppv
=
ifproxy
->
iface
;
/* AddRef'd above */
...
...
@@ -618,7 +619,7 @@ StdMarshalImpl_ReleaseMarshalData(LPMARSHAL iface, IStream *pStm) {
/* currently, each marshal has its own interface stub. this might
* not be correct. but, it means we don't need to refcount anything
* here. */
stub_manager_delete_ifstub
(
stubmgr
,
&
mid
.
iid
);
stub_manager_delete_ifstub
(
stubmgr
,
&
mid
.
i
p
id
);
stub_manager_unref
(
stubmgr
,
1
);
...
...
dlls/ole32/stubmanager.c
View file @
86d63bbb
...
...
@@ -192,7 +192,7 @@ int stub_manager_unref(struct stub_manager *m, int refs)
return
refs
;
}
static
struct
ifstub
*
stub_manager_i
id_to_ifstub
(
struct
stub_manager
*
m
,
IID
*
i
id
)
static
struct
ifstub
*
stub_manager_i
pid_to_ifstub
(
struct
stub_manager
*
m
,
IPID
*
ip
id
)
{
struct
list
*
cursor
;
struct
ifstub
*
result
=
NULL
;
...
...
@@ -202,7 +202,7 @@ static struct ifstub *stub_manager_iid_to_ifstub(struct stub_manager *m, IID *ii
{
struct
ifstub
*
ifstub
=
LIST_ENTRY
(
cursor
,
struct
ifstub
,
entry
);
if
(
IsEqual
IID
(
iid
,
&
ifstub
->
i
id
))
if
(
IsEqual
GUID
(
ipid
,
&
ifstub
->
ip
id
))
{
result
=
ifstub
;
break
;
...
...
@@ -213,15 +213,15 @@ static struct ifstub *stub_manager_iid_to_ifstub(struct stub_manager *m, IID *ii
return
result
;
}
IRpcStubBuffer
*
stub_manager_i
id_to_stubbuffer
(
struct
stub_manager
*
m
,
IID
*
i
id
)
IRpcStubBuffer
*
stub_manager_i
pid_to_stubbuffer
(
struct
stub_manager
*
m
,
IPID
*
ip
id
)
{
struct
ifstub
*
ifstub
=
stub_manager_i
id_to_ifstub
(
m
,
i
id
);
struct
ifstub
*
ifstub
=
stub_manager_i
pid_to_ifstub
(
m
,
ip
id
);
return
ifstub
?
ifstub
->
stubbuffer
:
NULL
;
}
/* registers a new interface stub COM object with the stub manager and returns registration record */
struct
ifstub
*
stub_manager_new_ifstub
(
struct
stub_manager
*
m
,
IRpcStubBuffer
*
sb
,
IUnknown
*
iptr
,
IID
*
iid
,
BOOL
tablemarshal
)
struct
ifstub
*
stub_manager_new_ifstub
(
struct
stub_manager
*
m
,
IRpcStubBuffer
*
sb
,
IUnknown
*
iptr
,
REFIID
iid
,
BOOL
tablemarshal
)
{
struct
ifstub
*
stub
;
...
...
@@ -238,6 +238,7 @@ struct ifstub *stub_manager_new_ifstub(struct stub_manager *m, IRpcStubBuffer *s
stub
->
iface
=
iptr
;
stub
->
table
=
tablemarshal
;
stub
->
iid
=
*
iid
;
stub
->
ipid
=
*
iid
;
/* FIXME: should be globally unique */
EnterCriticalSection
(
&
m
->
lock
);
list_add_head
(
&
m
->
ifstubs
,
&
stub
->
entry
);
...
...
@@ -247,15 +248,15 @@ struct ifstub *stub_manager_new_ifstub(struct stub_manager *m, IRpcStubBuffer *s
}
/* fixme: should ifstubs be refcounted? iid should be ipid */
void
stub_manager_delete_ifstub
(
struct
stub_manager
*
m
,
I
ID
*
i
id
)
void
stub_manager_delete_ifstub
(
struct
stub_manager
*
m
,
I
PID
*
ip
id
)
{
struct
ifstub
*
ifstub
;
TRACE
(
"m=%p, m->oid=%s, i
id=%s
\n
"
,
m
,
wine_dbgstr_longlong
(
m
->
oid
),
debugstr_guid
(
i
id
));
TRACE
(
"m=%p, m->oid=%s, i
pid=%s
\n
"
,
m
,
wine_dbgstr_longlong
(
m
->
oid
),
debugstr_guid
(
ip
id
));
EnterCriticalSection
(
&
m
->
lock
);
if
((
ifstub
=
stub_manager_i
id_to_ifstub
(
m
,
i
id
)))
if
((
ifstub
=
stub_manager_i
pid_to_ifstub
(
m
,
ip
id
)))
{
list_remove
(
&
ifstub
->
entry
);
...
...
@@ -266,7 +267,7 @@ void stub_manager_delete_ifstub(struct stub_manager *m, IID *iid)
}
else
{
WARN
(
"could not map i
id %s to ifstub
\n
"
,
debugstr_guid
(
i
id
));
WARN
(
"could not map i
pid %s to ifstub
\n
"
,
debugstr_guid
(
ip
id
));
}
LeaveCriticalSection
(
&
m
->
lock
);
...
...
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