rpcrt4: Use nameless union/structs.
This commit is contained in:
parent
23daba9abe
commit
d8e35c51c9
2 changed files with 10 additions and 13 deletions
|
@ -33,7 +33,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#define NONAMELESSUNION
|
|
||||||
#include "windef.h"
|
#include "windef.h"
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
#include "winerror.h"
|
#include "winerror.h"
|
||||||
|
@ -4617,15 +4616,15 @@ RPC_STATUS RPC_ENTRY NdrGetUserMarshalInfo(ULONG *flags, ULONG level, NDR_USER_M
|
||||||
if (level != 1)
|
if (level != 1)
|
||||||
return RPC_S_INVALID_ARG;
|
return RPC_S_INVALID_ARG;
|
||||||
|
|
||||||
memset(&umi->u1.Level1, 0, sizeof(umi->u1.Level1));
|
memset(&umi->Level1, 0, sizeof(umi->Level1));
|
||||||
umi->InformationLevel = level;
|
umi->InformationLevel = level;
|
||||||
|
|
||||||
if (umcb->Signature != USER_MARSHAL_CB_SIGNATURE)
|
if (umcb->Signature != USER_MARSHAL_CB_SIGNATURE)
|
||||||
return RPC_S_INVALID_ARG;
|
return RPC_S_INVALID_ARG;
|
||||||
|
|
||||||
umi->u1.Level1.pfnAllocate = umcb->pStubMsg->pfnAllocate;
|
umi->Level1.pfnAllocate = umcb->pStubMsg->pfnAllocate;
|
||||||
umi->u1.Level1.pfnFree = umcb->pStubMsg->pfnFree;
|
umi->Level1.pfnFree = umcb->pStubMsg->pfnFree;
|
||||||
umi->u1.Level1.pRpcChannelBuffer = umcb->pStubMsg->pRpcChannelBuffer;
|
umi->Level1.pRpcChannelBuffer = umcb->pStubMsg->pRpcChannelBuffer;
|
||||||
|
|
||||||
switch (umcb->CBType)
|
switch (umcb->CBType)
|
||||||
{
|
{
|
||||||
|
@ -4641,8 +4640,8 @@ RPC_STATUS RPC_ENTRY NdrGetUserMarshalInfo(ULONG *flags, ULONG level, NDR_USER_M
|
||||||
umcb->pStubMsg->Buffer > buffer_end)
|
umcb->pStubMsg->Buffer > buffer_end)
|
||||||
return RPC_X_INVALID_BUFFER;
|
return RPC_X_INVALID_BUFFER;
|
||||||
|
|
||||||
umi->u1.Level1.Buffer = umcb->pStubMsg->Buffer;
|
umi->Level1.Buffer = umcb->pStubMsg->Buffer;
|
||||||
umi->u1.Level1.BufferSize = buffer_end - umcb->pStubMsg->Buffer;
|
umi->Level1.BufferSize = buffer_end - umcb->pStubMsg->Buffer;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case USER_MARSHAL_CB_BUFFER_SIZE:
|
case USER_MARSHAL_CB_BUFFER_SIZE:
|
||||||
|
|
|
@ -26,8 +26,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define COBJMACROS
|
#define COBJMACROS
|
||||||
#define NONAMELESSUNION
|
|
||||||
|
|
||||||
#include "windef.h"
|
#include "windef.h"
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
#include "winerror.h"
|
#include "winerror.h"
|
||||||
|
@ -139,13 +137,13 @@ static HRESULT WINAPI RpcStream_Seek(LPSTREAM iface,
|
||||||
RpcStreamImpl *This = impl_from_IStream(iface);
|
RpcStreamImpl *This = impl_from_IStream(iface);
|
||||||
switch (origin) {
|
switch (origin) {
|
||||||
case STREAM_SEEK_SET:
|
case STREAM_SEEK_SET:
|
||||||
This->pos = move.u.LowPart;
|
This->pos = move.LowPart;
|
||||||
break;
|
break;
|
||||||
case STREAM_SEEK_CUR:
|
case STREAM_SEEK_CUR:
|
||||||
This->pos = This->pos + move.u.LowPart;
|
This->pos = This->pos + move.LowPart;
|
||||||
break;
|
break;
|
||||||
case STREAM_SEEK_END:
|
case STREAM_SEEK_END:
|
||||||
This->pos = *This->size + move.u.LowPart;
|
This->pos = *This->size + move.LowPart;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return STG_E_INVALIDFUNCTION;
|
return STG_E_INVALIDFUNCTION;
|
||||||
|
@ -161,7 +159,7 @@ static HRESULT WINAPI RpcStream_SetSize(LPSTREAM iface,
|
||||||
ULARGE_INTEGER newSize)
|
ULARGE_INTEGER newSize)
|
||||||
{
|
{
|
||||||
RpcStreamImpl *This = impl_from_IStream(iface);
|
RpcStreamImpl *This = impl_from_IStream(iface);
|
||||||
*This->size = newSize.u.LowPart;
|
*This->size = newSize.LowPart;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue