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
01d00d17
Commit
01d00d17
authored
Jun 03, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Split the vtbl initialization in NdrDllGetClassObject to a separate function.
parent
16436794
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
23 deletions
+31
-23
cpsf.c
dlls/rpcrt4/cpsf.c
+31
-23
No files found.
dlls/rpcrt4/cpsf.c
View file @
01d00d17
...
...
@@ -145,6 +145,35 @@ static const IPSFactoryBufferVtbl CStdPSFactory_Vtbl =
CStdPSFactory_CreateStub
};
static
void
init_psfactory
(
CStdPSFactoryBuffer
*
psfac
,
const
ProxyFileInfo
**
file_list
)
{
DWORD
i
,
j
,
k
;
psfac
->
lpVtbl
=
&
CStdPSFactory_Vtbl
;
psfac
->
RefCount
=
0
;
psfac
->
pProxyFileList
=
file_list
;
for
(
i
=
0
;
file_list
[
i
];
i
++
)
{
const
PCInterfaceStubVtblList
*
stubs
=
file_list
[
i
]
->
pStubVtblList
;
for
(
j
=
0
;
j
<
file_list
[
i
]
->
TableSize
;
j
++
)
{
/* FIXME: i think that different vtables should be copied for
* async interfaces */
void
*
const
*
pSrcRpcStubVtbl
=
(
void
*
const
*
)
&
CStdStubBuffer_Vtbl
;
void
**
pRpcStubVtbl
=
(
void
**
)
&
stubs
[
j
]
->
Vtbl
;
if
(
file_list
[
i
]
->
pDelegatedIIDs
&&
file_list
[
i
]
->
pDelegatedIIDs
[
j
])
pSrcRpcStubVtbl
=
(
void
*
const
*
)
&
CStdStubBuffer_Delegating_Vtbl
;
for
(
k
=
0
;
k
<
sizeof
(
IRpcStubBufferVtbl
)
/
sizeof
(
void
*
);
k
++
)
if
(
!
pRpcStubVtbl
[
k
])
pRpcStubVtbl
[
k
]
=
pSrcRpcStubVtbl
[
k
];
}
}
}
/***********************************************************************
* NdrDllGetClassObject [RPCRT4.@]
*/
...
...
@@ -158,29 +187,8 @@ HRESULT WINAPI NdrDllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv,
pPSFactoryBuffer
);
*
ppv
=
NULL
;
if
(
!
pPSFactoryBuffer
->
lpVtbl
)
{
const
ProxyFileInfo
**
pProxyFileList2
;
pPSFactoryBuffer
->
lpVtbl
=
&
CStdPSFactory_Vtbl
;
pPSFactoryBuffer
->
RefCount
=
0
;
pPSFactoryBuffer
->
pProxyFileList
=
pProxyFileList
;
for
(
pProxyFileList2
=
pProxyFileList
;
*
pProxyFileList2
;
pProxyFileList2
++
)
{
int
i
;
for
(
i
=
0
;
i
<
(
*
pProxyFileList2
)
->
TableSize
;
i
++
)
{
/* FIXME: i think that different vtables should be copied for
* async interfaces */
void
*
const
*
pSrcRpcStubVtbl
=
(
void
*
const
*
)
&
CStdStubBuffer_Vtbl
;
void
**
pRpcStubVtbl
=
(
void
**
)
&
(
*
pProxyFileList2
)
->
pStubVtblList
[
i
]
->
Vtbl
;
unsigned
int
j
;
if
((
*
pProxyFileList2
)
->
pDelegatedIIDs
&&
(
*
pProxyFileList2
)
->
pDelegatedIIDs
[
i
])
pSrcRpcStubVtbl
=
(
void
*
const
*
)
&
CStdStubBuffer_Delegating_Vtbl
;
for
(
j
=
0
;
j
<
sizeof
(
IRpcStubBufferVtbl
)
/
sizeof
(
void
*
);
j
++
)
if
(
!
pRpcStubVtbl
[
j
])
pRpcStubVtbl
[
j
]
=
pSrcRpcStubVtbl
[
j
];
}
}
}
if
(
!
pPSFactoryBuffer
->
lpVtbl
)
init_psfactory
(
pPSFactoryBuffer
,
pProxyFileList
);
if
(
pclsid
&&
IsEqualGUID
(
rclsid
,
pclsid
))
return
IPSFactoryBuffer_QueryInterface
((
LPPSFACTORYBUFFER
)
pPSFactoryBuffer
,
iid
,
ppv
);
else
{
...
...
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