Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
583ae122
Commit
583ae122
authored
Aug 29, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Sep 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Move NdrStub* functions to cstub.c and move NdrProxy*
functions to cproxy.c since both sets of functions depend on the implementations of the standard stubs and proxies.
parent
4d7b2306
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
135 additions
and
140 deletions
+135
-140
cproxy.c
dlls/rpcrt4/cproxy.c
+106
-4
cpsf.h
dlls/rpcrt4/cpsf.h
+0
-4
cstub.c
dlls/rpcrt4/cstub.c
+29
-0
ndr_midl.c
dlls/rpcrt4/ndr_midl.c
+0
-132
No files found.
dlls/rpcrt4/cproxy.c
View file @
583ae122
...
...
@@ -285,8 +285,8 @@ static const IRpcProxyBufferVtbl StdProxy_Vtbl =
StdProxy_Disconnect
};
HRESULT
WINAPI
StdProxy_GetChannel
(
LPVOID
iface
,
LPRPCCHANNELBUFFER
*
ppChannel
)
static
HRESULT
StdProxy_GetChannel
(
LPVOID
iface
,
LPRPCCHANNELBUFFER
*
ppChannel
)
{
ICOM_THIS_MULTI
(
StdProxyImpl
,
PVtbl
,
iface
);
TRACE
(
"(%p)->GetChannel(%p) %s
\n
"
,
This
,
ppChannel
,
This
->
name
);
...
...
@@ -295,8 +295,8 @@ HRESULT WINAPI StdProxy_GetChannel(LPVOID iface,
return
S_OK
;
}
HRESULT
WINAPI
StdProxy_GetIID
(
LPVOID
iface
,
const
IID
**
ppiid
)
static
HRESULT
StdProxy_GetIID
(
LPVOID
iface
,
const
IID
**
ppiid
)
{
ICOM_THIS_MULTI
(
StdProxyImpl
,
PVtbl
,
iface
);
TRACE
(
"(%p)->GetIID(%p) %s
\n
"
,
This
,
ppiid
,
This
->
name
);
...
...
@@ -340,6 +340,108 @@ ULONG WINAPI IUnknown_Release_Proxy(LPUNKNOWN iface)
#endif
}
/***********************************************************************
* NdrProxyInitialize [RPCRT4.@]
*/
void
WINAPI
NdrProxyInitialize
(
void
*
This
,
PRPC_MESSAGE
pRpcMsg
,
PMIDL_STUB_MESSAGE
pStubMsg
,
PMIDL_STUB_DESC
pStubDescriptor
,
unsigned
int
ProcNum
)
{
HRESULT
hr
;
TRACE
(
"(%p,%p,%p,%p,%d)
\n
"
,
This
,
pRpcMsg
,
pStubMsg
,
pStubDescriptor
,
ProcNum
);
NdrClientInitializeNew
(
pRpcMsg
,
pStubMsg
,
pStubDescriptor
,
ProcNum
);
if
(
This
)
StdProxy_GetChannel
(
This
,
&
pStubMsg
->
pRpcChannelBuffer
);
if
(
pStubMsg
->
pRpcChannelBuffer
)
{
hr
=
IRpcChannelBuffer_GetDestCtx
(
pStubMsg
->
pRpcChannelBuffer
,
&
pStubMsg
->
dwDestContext
,
&
pStubMsg
->
pvDestContext
);
}
TRACE
(
"channel=%p
\n
"
,
pStubMsg
->
pRpcChannelBuffer
);
}
/***********************************************************************
* NdrProxyGetBuffer [RPCRT4.@]
*/
void
WINAPI
NdrProxyGetBuffer
(
void
*
This
,
PMIDL_STUB_MESSAGE
pStubMsg
)
{
HRESULT
hr
;
const
IID
*
riid
=
NULL
;
TRACE
(
"(%p,%p)
\n
"
,
This
,
pStubMsg
);
pStubMsg
->
RpcMsg
->
BufferLength
=
pStubMsg
->
BufferLength
;
pStubMsg
->
dwStubPhase
=
PROXY_GETBUFFER
;
hr
=
StdProxy_GetIID
(
This
,
&
riid
);
hr
=
IRpcChannelBuffer_GetBuffer
(
pStubMsg
->
pRpcChannelBuffer
,
(
RPCOLEMESSAGE
*
)
pStubMsg
->
RpcMsg
,
riid
);
pStubMsg
->
BufferStart
=
pStubMsg
->
RpcMsg
->
Buffer
;
pStubMsg
->
BufferEnd
=
pStubMsg
->
BufferStart
+
pStubMsg
->
BufferLength
;
pStubMsg
->
Buffer
=
pStubMsg
->
BufferStart
;
pStubMsg
->
dwStubPhase
=
PROXY_MARSHAL
;
}
/***********************************************************************
* NdrProxySendReceive [RPCRT4.@]
*/
void
WINAPI
NdrProxySendReceive
(
void
*
This
,
PMIDL_STUB_MESSAGE
pStubMsg
)
{
ULONG
Status
=
0
;
HRESULT
hr
;
TRACE
(
"(%p,%p)
\n
"
,
This
,
pStubMsg
);
if
(
!
pStubMsg
->
pRpcChannelBuffer
)
{
WARN
(
"Trying to use disconnected proxy %p
\n
"
,
This
);
RpcRaiseException
(
RPC_E_DISCONNECTED
);
}
pStubMsg
->
dwStubPhase
=
PROXY_SENDRECEIVE
;
hr
=
IRpcChannelBuffer_SendReceive
(
pStubMsg
->
pRpcChannelBuffer
,
(
RPCOLEMESSAGE
*
)
pStubMsg
->
RpcMsg
,
&
Status
);
pStubMsg
->
dwStubPhase
=
PROXY_UNMARSHAL
;
pStubMsg
->
BufferLength
=
pStubMsg
->
RpcMsg
->
BufferLength
;
pStubMsg
->
BufferStart
=
pStubMsg
->
RpcMsg
->
Buffer
;
pStubMsg
->
BufferEnd
=
pStubMsg
->
BufferStart
+
pStubMsg
->
BufferLength
;
pStubMsg
->
Buffer
=
pStubMsg
->
BufferStart
;
/* raise exception if call failed */
if
(
hr
==
RPC_S_CALL_FAILED
)
RpcRaiseException
(
*
(
DWORD
*
)
pStubMsg
->
Buffer
);
else
if
(
FAILED
(
hr
))
RpcRaiseException
(
hr
);
}
/***********************************************************************
* NdrProxyFreeBuffer [RPCRT4.@]
*/
void
WINAPI
NdrProxyFreeBuffer
(
void
*
This
,
PMIDL_STUB_MESSAGE
pStubMsg
)
{
HRESULT
hr
;
TRACE
(
"(%p,%p)
\n
"
,
This
,
pStubMsg
);
hr
=
IRpcChannelBuffer_FreeBuffer
(
pStubMsg
->
pRpcChannelBuffer
,
(
RPCOLEMESSAGE
*
)
pStubMsg
->
RpcMsg
);
}
/***********************************************************************
* NdrProxyErrorHandler [RPCRT4.@]
*/
HRESULT
WINAPI
NdrProxyErrorHandler
(
DWORD
dwExceptionCode
)
{
WARN
(
"(0x%08lx): a proxy call failed
\n
"
,
dwExceptionCode
);
if
(
FAILED
(
dwExceptionCode
))
return
dwExceptionCode
;
else
return
HRESULT_FROM_WIN32
(
dwExceptionCode
);
}
HRESULT
WINAPI
CreateProxyFromTypeInfo
(
LPTYPEINFO
pTypeInfo
,
LPUNKNOWN
pUnkOuter
,
REFIID
riid
,
LPRPCPROXYBUFFER
*
ppProxy
,
LPVOID
*
ppv
)
...
...
dlls/rpcrt4/cpsf.h
View file @
583ae122
...
...
@@ -28,10 +28,6 @@ HRESULT WINAPI StdProxy_Construct(REFIID riid,
LPPSFACTORYBUFFER
pPSFactory
,
LPRPCPROXYBUFFER
*
ppProxy
,
LPVOID
*
ppvObj
);
HRESULT
WINAPI
StdProxy_GetChannel
(
LPVOID
iface
,
LPRPCCHANNELBUFFER
*
ppChannel
);
HRESULT
WINAPI
StdProxy_GetIID
(
LPVOID
iface
,
const
IID
**
piid
);
HRESULT
WINAPI
CStdStubBuffer_Construct
(
REFIID
riid
,
LPUNKNOWN
pUnkServer
,
...
...
dlls/rpcrt4/cstub.c
View file @
583ae122
...
...
@@ -263,3 +263,32 @@ void __RPC_STUB NdrStubForwardingFunction( IRpcStubBuffer *This, IRpcChannelBuff
FIXME
(
"Not implemented
\n
"
);
return
;
}
/***********************************************************************
* NdrStubInitialize [RPCRT4.@]
*/
void
WINAPI
NdrStubInitialize
(
PRPC_MESSAGE
pRpcMsg
,
PMIDL_STUB_MESSAGE
pStubMsg
,
PMIDL_STUB_DESC
pStubDescriptor
,
LPRPCCHANNELBUFFER
pRpcChannelBuffer
)
{
TRACE
(
"(%p,%p,%p,%p)
\n
"
,
pRpcMsg
,
pStubMsg
,
pStubDescriptor
,
pRpcChannelBuffer
);
NdrServerInitializeNew
(
pRpcMsg
,
pStubMsg
,
pStubDescriptor
);
pStubMsg
->
pRpcChannelBuffer
=
pRpcChannelBuffer
;
}
/***********************************************************************
* NdrStubGetBuffer [RPCRT4.@]
*/
void
WINAPI
NdrStubGetBuffer
(
LPRPCSTUBBUFFER
This
,
LPRPCCHANNELBUFFER
pRpcChannelBuffer
,
PMIDL_STUB_MESSAGE
pStubMsg
)
{
TRACE
(
"(%p,%p)
\n
"
,
This
,
pStubMsg
);
pStubMsg
->
pRpcChannelBuffer
=
pRpcChannelBuffer
;
pStubMsg
->
RpcMsg
->
BufferLength
=
pStubMsg
->
BufferLength
;
I_RpcGetBuffer
(
pStubMsg
->
RpcMsg
);
/* ? */
pStubMsg
->
BufferStart
=
pStubMsg
->
RpcMsg
->
Buffer
;
pStubMsg
->
BufferEnd
=
pStubMsg
->
BufferStart
+
pStubMsg
->
BufferLength
;
pStubMsg
->
Buffer
=
pStubMsg
->
BufferStart
;
}
dlls/rpcrt4/ndr_midl.c
View file @
583ae122
...
...
@@ -40,143 +40,11 @@
#include "wine/debug.h"
#include "cpsf.h"
#include "ndr_misc.h"
#include "rpcndr.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
rpc
);
/***********************************************************************
* NdrProxyInitialize [RPCRT4.@]
*/
void
WINAPI
NdrProxyInitialize
(
void
*
This
,
PRPC_MESSAGE
pRpcMsg
,
PMIDL_STUB_MESSAGE
pStubMsg
,
PMIDL_STUB_DESC
pStubDescriptor
,
unsigned
int
ProcNum
)
{
HRESULT
hr
;
TRACE
(
"(%p,%p,%p,%p,%d)
\n
"
,
This
,
pRpcMsg
,
pStubMsg
,
pStubDescriptor
,
ProcNum
);
NdrClientInitializeNew
(
pRpcMsg
,
pStubMsg
,
pStubDescriptor
,
ProcNum
);
if
(
This
)
StdProxy_GetChannel
(
This
,
&
pStubMsg
->
pRpcChannelBuffer
);
if
(
pStubMsg
->
pRpcChannelBuffer
)
{
hr
=
IRpcChannelBuffer_GetDestCtx
(
pStubMsg
->
pRpcChannelBuffer
,
&
pStubMsg
->
dwDestContext
,
&
pStubMsg
->
pvDestContext
);
}
TRACE
(
"channel=%p
\n
"
,
pStubMsg
->
pRpcChannelBuffer
);
}
/***********************************************************************
* NdrProxyGetBuffer [RPCRT4.@]
*/
void
WINAPI
NdrProxyGetBuffer
(
void
*
This
,
PMIDL_STUB_MESSAGE
pStubMsg
)
{
HRESULT
hr
;
const
IID
*
riid
=
NULL
;
TRACE
(
"(%p,%p)
\n
"
,
This
,
pStubMsg
);
pStubMsg
->
RpcMsg
->
BufferLength
=
pStubMsg
->
BufferLength
;
pStubMsg
->
dwStubPhase
=
PROXY_GETBUFFER
;
hr
=
StdProxy_GetIID
(
This
,
&
riid
);
hr
=
IRpcChannelBuffer_GetBuffer
(
pStubMsg
->
pRpcChannelBuffer
,
(
RPCOLEMESSAGE
*
)
pStubMsg
->
RpcMsg
,
riid
);
pStubMsg
->
BufferStart
=
pStubMsg
->
RpcMsg
->
Buffer
;
pStubMsg
->
BufferEnd
=
pStubMsg
->
BufferStart
+
pStubMsg
->
BufferLength
;
pStubMsg
->
Buffer
=
pStubMsg
->
BufferStart
;
pStubMsg
->
dwStubPhase
=
PROXY_MARSHAL
;
}
/***********************************************************************
* NdrProxySendReceive [RPCRT4.@]
*/
void
WINAPI
NdrProxySendReceive
(
void
*
This
,
PMIDL_STUB_MESSAGE
pStubMsg
)
{
ULONG
Status
=
0
;
HRESULT
hr
;
TRACE
(
"(%p,%p)
\n
"
,
This
,
pStubMsg
);
if
(
!
pStubMsg
->
pRpcChannelBuffer
)
{
WARN
(
"Trying to use disconnected proxy %p
\n
"
,
This
);
RpcRaiseException
(
RPC_E_DISCONNECTED
);
}
pStubMsg
->
dwStubPhase
=
PROXY_SENDRECEIVE
;
hr
=
IRpcChannelBuffer_SendReceive
(
pStubMsg
->
pRpcChannelBuffer
,
(
RPCOLEMESSAGE
*
)
pStubMsg
->
RpcMsg
,
&
Status
);
pStubMsg
->
dwStubPhase
=
PROXY_UNMARSHAL
;
pStubMsg
->
BufferLength
=
pStubMsg
->
RpcMsg
->
BufferLength
;
pStubMsg
->
BufferStart
=
pStubMsg
->
RpcMsg
->
Buffer
;
pStubMsg
->
BufferEnd
=
pStubMsg
->
BufferStart
+
pStubMsg
->
BufferLength
;
pStubMsg
->
Buffer
=
pStubMsg
->
BufferStart
;
/* raise exception if call failed */
if
(
hr
==
RPC_S_CALL_FAILED
)
RpcRaiseException
(
*
(
DWORD
*
)
pStubMsg
->
Buffer
);
else
if
(
FAILED
(
hr
))
RpcRaiseException
(
hr
);
}
/***********************************************************************
* NdrProxyFreeBuffer [RPCRT4.@]
*/
void
WINAPI
NdrProxyFreeBuffer
(
void
*
This
,
PMIDL_STUB_MESSAGE
pStubMsg
)
{
HRESULT
hr
;
TRACE
(
"(%p,%p)
\n
"
,
This
,
pStubMsg
);
hr
=
IRpcChannelBuffer_FreeBuffer
(
pStubMsg
->
pRpcChannelBuffer
,
(
RPCOLEMESSAGE
*
)
pStubMsg
->
RpcMsg
);
}
/***********************************************************************
* NdrProxyErrorHandler [RPCRT4.@]
*/
HRESULT
WINAPI
NdrProxyErrorHandler
(
DWORD
dwExceptionCode
)
{
WARN
(
"(0x%08lx): a proxy call failed
\n
"
,
dwExceptionCode
);
if
(
FAILED
(
dwExceptionCode
))
return
dwExceptionCode
;
else
return
HRESULT_FROM_WIN32
(
dwExceptionCode
);
}
/***********************************************************************
* NdrStubInitialize [RPCRT4.@]
*/
void
WINAPI
NdrStubInitialize
(
PRPC_MESSAGE
pRpcMsg
,
PMIDL_STUB_MESSAGE
pStubMsg
,
PMIDL_STUB_DESC
pStubDescriptor
,
LPRPCCHANNELBUFFER
pRpcChannelBuffer
)
{
TRACE
(
"(%p,%p,%p,%p)
\n
"
,
pRpcMsg
,
pStubMsg
,
pStubDescriptor
,
pRpcChannelBuffer
);
NdrServerInitializeNew
(
pRpcMsg
,
pStubMsg
,
pStubDescriptor
);
pStubMsg
->
pRpcChannelBuffer
=
pRpcChannelBuffer
;
}
/***********************************************************************
* NdrStubGetBuffer [RPCRT4.@]
*/
void
WINAPI
NdrStubGetBuffer
(
LPRPCSTUBBUFFER
This
,
LPRPCCHANNELBUFFER
pRpcChannelBuffer
,
PMIDL_STUB_MESSAGE
pStubMsg
)
{
TRACE
(
"(%p,%p)
\n
"
,
This
,
pStubMsg
);
pStubMsg
->
pRpcChannelBuffer
=
pRpcChannelBuffer
;
pStubMsg
->
RpcMsg
->
BufferLength
=
pStubMsg
->
BufferLength
;
I_RpcGetBuffer
(
pStubMsg
->
RpcMsg
);
/* ? */
pStubMsg
->
BufferStart
=
pStubMsg
->
RpcMsg
->
Buffer
;
pStubMsg
->
BufferEnd
=
pStubMsg
->
BufferStart
+
pStubMsg
->
BufferLength
;
pStubMsg
->
Buffer
=
pStubMsg
->
BufferStart
;
}
/************************************************************************
* NdrClientInitializeNew [RPCRT4.@]
*/
...
...
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