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
a215f6b2
Commit
a215f6b2
authored
Oct 28, 2002
by
Greg Turner
Committed by
Alexandre Julliard
Oct 28, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Clean up and add some comments.
- Add NDR Data representation constants. - Propagate DataRepresentation into and out of packet headers. - Implement NdrServerInitializeNew
parent
1563fab4
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
2 deletions
+45
-2
ndr_marshall.c
dlls/rpcrt4/ndr_marshall.c
+5
-1
ndr_midl.c
dlls/rpcrt4/ndr_midl.c
+20
-1
rpc_message.c
dlls/rpcrt4/rpc_message.c
+4
-0
rpc_server.c
dlls/rpcrt4/rpc_server.c
+6
-0
rpcndr.h
include/rpcndr.h
+10
-0
No files found.
dlls/rpcrt4/ndr_marshall.c
View file @
a215f6b2
...
...
@@ -105,7 +105,7 @@ void WINAPI NdrConformantStringBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned
TRACE
(
"(pStubMsg == ^%p, pMemory == ^%p, pFormat == ^%p)
\n
"
,
pStubMsg
,
pMemory
,
pFormat
);
if
(
*
pFormat
==
RPC_FC_C_CSTRING
)
{
/* we need 12
chars for the [maxlen, offset, len] DWORDS, + 1 byte
for '\0' */
/* we need 12
octets for the [maxlen, offset, len] DWORDS, + 1 octet
for '\0' */
pStubMsg
->
BufferLength
=
strlen
(
pMemory
)
+
13
+
BUFFER_PARANOIA
;
}
else
{
ERR
(
"Unhandled string type: %#x
\n
"
,
*
pFormat
);
...
...
@@ -139,6 +139,8 @@ unsigned char *WINAPI NdrConformantStringUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
void
WINAPI
NdrConvert
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
)
{
FIXME
(
"(pStubMsg == ^%p, pFormat == ^%p): stub.
\n
"
,
pStubMsg
,
pFormat
);
/* FIXME: since this stub doesn't do any converting, the proper behavior
is to raise an exception */
}
/***********************************************************************
...
...
@@ -147,4 +149,6 @@ void WINAPI NdrConvert( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat )
void
WINAPI
NdrConvert2
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
,
long
NumberParams
)
{
FIXME
(
"(pStubMsg == ^%p, pFormat == ^%p, NumberParams == %ld): stub.
\n
"
,
pStubMsg
,
pFormat
,
NumberParams
);
/* FIXME: since this stub doesn't do any converting, the proper behavior
is to raise an exception */
}
dlls/rpcrt4/ndr_midl.c
View file @
a215f6b2
...
...
@@ -40,6 +40,7 @@
#include "cpsf.h"
#include "ndr_misc.h"
#include "rpcndr.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
ole
);
...
...
@@ -178,6 +179,8 @@ void WINAPI NdrClientInitializeNew( PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE
TRACE
(
"(pRpcMessage == ^%p, pStubMsg == ^%p, pStubDesc == ^%p, ProcNum == %d)
\n
"
,
pRpcMessage
,
pStubMsg
,
pStubDesc
,
ProcNum
);
assert
(
pRpcMessage
&&
pStubMsg
&&
pStubDesc
);
memset
(
pRpcMessage
,
0
,
sizeof
(
RPC_MESSAGE
));
memset
(
pStubMsg
,
0
,
sizeof
(
MIDL_STUB_MESSAGE
));
...
...
@@ -198,7 +201,20 @@ void WINAPI NdrClientInitializeNew( PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE
unsigned
char
*
WINAPI
NdrServerInitializeNew
(
PRPC_MESSAGE
pRpcMsg
,
PMIDL_STUB_MESSAGE
pStubMsg
,
PMIDL_STUB_DESC
pStubDesc
)
{
FIXME
(
"(pRpcMsg == ^%p, pStubMsg == ^%p, pStubDesc == ^%p): stub.
\n
"
,
pRpcMsg
,
pStubMsg
,
pStubDesc
);
TRACE
(
"(pRpcMsg == ^%p, pStubMsg == ^%p, pStubDesc == ^%p)
\n
"
,
pRpcMsg
,
pStubMsg
,
pStubDesc
);
assert
(
pRpcMsg
&&
pStubMsg
&&
pStubDesc
);
memset
(
pStubMsg
,
0
,
sizeof
(
MIDL_STUB_MESSAGE
));
pStubMsg
->
ReuseBuffer
=
TRUE
;
pStubMsg
->
IsClient
=
FALSE
;
pStubMsg
->
StubDesc
=
pStubDesc
;
pStubMsg
->
pfnAllocate
=
pStubDesc
->
pfnAllocate
;
pStubMsg
->
pfnFree
=
pStubDesc
->
pfnFree
;
pStubMsg
->
RpcMsg
=
pRpcMsg
;
/* FIXME: determine the proper return value */
return
NULL
;
}
...
...
@@ -254,6 +270,9 @@ unsigned char *WINAPI NdrSendReceive( MIDL_STUB_MESSAGE *stubmsg, unsigned char
return
NULL
;
}
/* not sure where MS does this; for now I'll stick it here */
stubmsg
->
RpcMsg
->
DataRepresentation
=
NDR_LOCAL_DATA_REPRESENTATION
;
if
(
I_RpcSendReceive
(
stubmsg
->
RpcMsg
)
!=
RPC_S_OK
)
{
WARN
(
"I_RpcSendReceive did not return success.
\n
"
);
}
...
...
dlls/rpcrt4/rpc_message.c
View file @
a215f6b2
...
...
@@ -102,6 +102,10 @@ RPC_STATUS WINAPI I_RpcSend(PRPC_MESSAGE pMsg)
MAKELONG
(
sif
->
InterfaceId
.
SyntaxVersion
.
MinorVersion
,
sif
->
InterfaceId
.
SyntaxVersion
.
MajorVersion
)
:
MAKELONG
(
cif
->
InterfaceId
.
SyntaxVersion
.
MinorVersion
,
cif
->
InterfaceId
.
SyntaxVersion
.
MajorVersion
);
hdr
.
opnum
=
pMsg
->
ProcNum
;
/* only the low-order 3 octets of the DataRepresentation go in the header */
hdr
.
drep
[
0
]
=
LOBYTE
(
LOWORD
(
pMsg
->
DataRepresentation
));
hdr
.
drep
[
1
]
=
HIBYTE
(
LOWORD
(
pMsg
->
DataRepresentation
));
hdr
.
drep
[
2
]
=
LOBYTE
(
HIWORD
(
pMsg
->
DataRepresentation
));
hdr
.
len
=
pMsg
->
BufferLength
;
/* transmit packet */
...
...
dlls/rpcrt4/rpc_server.c
View file @
a215f6b2
...
...
@@ -145,6 +145,12 @@ static DWORD CALLBACK RPCRT4_io_thread(LPVOID the_arg)
func
=
sif
->
If
->
DispatchTable
->
DispatchTable
[
msg
.
ProcNum
];
}
/* put in the drep. FIXME: is this more universally applicable?
perhaps we should move this outward... */
msg
.
DataRepresentation
=
MAKELONG
(
MAKEWORD
(
hdr
.
drep
[
0
],
hdr
.
drep
[
1
]),
MAKEWORD
(
hdr
.
drep
[
2
],
0
));
/* dispatch */
if
(
func
)
func
(
&
msg
);
...
...
include/rpcndr.h
View file @
a215f6b2
...
...
@@ -26,6 +26,16 @@
#include "rpc.h"
#define NDR_LITTLE_ENDIAN ((UINT32) 0x00000010)
#define NDR_BIG_ENDIAN ((UINT32) 0x00000000)
/* Character Representation: ASCII
* Integer Representation: Little Endian
* FP Representation: IEEE
*/
#define NDR_LOCAL_DATA_REPRESENTATION ((UINT32) 0x00000010)
#define NDR_LOCAL_ENDIAN NDR_LITTLE_ENDIAN
#define TARGET_IS_NT40_OR_LATER 1
#define TARGET_IS_NT351_OR_WIN95_OR_LATER 1
...
...
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