1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

rpcrt4: Enable compilation with long types.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Eric Pouech 2022-02-17 07:11:49 +01:00 committed by Alexandre Julliard
parent df977dd3bb
commit b67a843c1a
19 changed files with 269 additions and 269 deletions

View file

@ -1,4 +1,4 @@
EXTRADEFS = -DWINE_NO_LONG_TYPES -D_RPCRT4_ -DMSWMSG EXTRADEFS = -D_RPCRT4_ -DMSWMSG
MODULE = rpcrt4.dll MODULE = rpcrt4.dll
IMPORTLIB = rpcrt4 IMPORTLIB = rpcrt4
IMPORTS = uuid advapi32 IMPORTS = uuid advapi32

View file

@ -289,7 +289,7 @@ BOOL fill_stubless_table( IUnknownVtbl *vtbl, DWORD num )
if (num - 3 > BLOCK_SIZE * MAX_BLOCKS) if (num - 3 > BLOCK_SIZE * MAX_BLOCKS)
{ {
FIXME( "%u methods not supported\n", num ); FIXME( "%lu methods not supported\n", num );
return FALSE; return FALSE;
} }
for (i = 0; i < (num - 3 + BLOCK_SIZE - 1) / BLOCK_SIZE; i++) for (i = 0; i < (num - 3 + BLOCK_SIZE - 1) / BLOCK_SIZE; i++)
@ -320,7 +320,7 @@ HRESULT StdProxy_Construct(REFIID riid,
if (ProxyInfo->TableVersion > 1) { if (ProxyInfo->TableVersion > 1) {
ULONG count = ProxyInfo->pStubVtblList[Index]->header.DispatchTableCount; ULONG count = ProxyInfo->pStubVtblList[Index]->header.DispatchTableCount;
vtbl = (CInterfaceProxyVtbl *)((const void **)vtbl + 1); vtbl = (CInterfaceProxyVtbl *)((const void **)vtbl + 1);
TRACE("stubless vtbl %p: count=%d\n", vtbl->Vtbl, count ); TRACE("stubless vtbl %p: count=%ld\n", vtbl->Vtbl, count );
fill_stubless_table( (IUnknownVtbl *)vtbl->Vtbl, count ); fill_stubless_table( (IUnknownVtbl *)vtbl->Vtbl, count );
} }
@ -592,7 +592,7 @@ void WINAPI NdrProxyFreeBuffer(void *This,
*/ */
HRESULT WINAPI NdrProxyErrorHandler(DWORD dwExceptionCode) HRESULT WINAPI NdrProxyErrorHandler(DWORD dwExceptionCode)
{ {
WARN("(0x%08x): a proxy call failed\n", dwExceptionCode); WARN("(0x%08lx): a proxy call failed\n", dwExceptionCode);
if (FAILED(dwExceptionCode)) if (FAILED(dwExceptionCode))
return dwExceptionCode; return dwExceptionCode;

View file

@ -248,7 +248,7 @@ static BOOL fill_delegated_stub_table(IUnknownVtbl *vtbl, DWORD num)
if (num - 3 > BLOCK_SIZE * MAX_BLOCKS) if (num - 3 > BLOCK_SIZE * MAX_BLOCKS)
{ {
FIXME( "%u methods not supported\n", num ); FIXME( "%lu methods not supported\n", num );
return FALSE; return FALSE;
} }
vtbl->QueryInterface = delegating_QueryInterface; vtbl->QueryInterface = delegating_QueryInterface;
@ -270,7 +270,7 @@ BOOL fill_delegated_proxy_table(IUnknownVtbl *vtbl, DWORD num)
if (num - 3 > BLOCK_SIZE * MAX_BLOCKS) if (num - 3 > BLOCK_SIZE * MAX_BLOCKS)
{ {
FIXME( "%u methods not supported\n", num ); FIXME( "%lu methods not supported\n", num );
return FALSE; return FALSE;
} }
vtbl->QueryInterface = IUnknown_QueryInterface_Proxy; vtbl->QueryInterface = IUnknown_QueryInterface_Proxy;
@ -328,7 +328,7 @@ void release_delegating_vtbl(IUnknownVtbl *vtbl)
EnterCriticalSection(&delegating_vtbl_section); EnterCriticalSection(&delegating_vtbl_section);
table->ref--; table->ref--;
TRACE("ref now %d\n", table->ref); TRACE("ref now %ld\n", table->ref);
if(table->ref == 0 && table != current_vtbl) if(table->ref == 0 && table != current_vtbl)
{ {
TRACE("... and we're not current so free'ing\n"); TRACE("... and we're not current so free'ing\n");
@ -508,7 +508,7 @@ HRESULT WINAPI CStdStubBuffer_Invoke(LPRPCSTUBBUFFER iface,
__EXCEPT(stub_filter) __EXCEPT(stub_filter)
{ {
DWORD dwExceptionCode = GetExceptionCode(); DWORD dwExceptionCode = GetExceptionCode();
WARN("a stub call failed with exception 0x%08x (%d)\n", dwExceptionCode, dwExceptionCode); WARN("a stub call failed with exception 0x%08lx (%ld)\n", dwExceptionCode, dwExceptionCode);
if (FAILED(dwExceptionCode)) if (FAILED(dwExceptionCode))
hr = dwExceptionCode; hr = dwExceptionCode;
else else

View file

@ -164,7 +164,7 @@ unsigned char *WINAPI NdrGetBuffer(PMIDL_STUB_MESSAGE stubmsg, ULONG buflen, RPC
{ {
RPC_STATUS status; RPC_STATUS status;
TRACE("(stubmsg == ^%p, buflen == %u, handle == %p)\n", stubmsg, buflen, handle); TRACE("(stubmsg == ^%p, buflen == %lu, handle == %p)\n", stubmsg, buflen, handle);
stubmsg->RpcMsg->Handle = handle; stubmsg->RpcMsg->Handle = handle;
stubmsg->RpcMsg->BufferLength = buflen; stubmsg->RpcMsg->BufferLength = buflen;
@ -233,7 +233,7 @@ RPC_STATUS RPC_ENTRY NdrMapCommAndFaultStatus( PMIDL_STUB_MESSAGE pStubMsg,
ULONG *pFaultStatus, ULONG *pFaultStatus,
RPC_STATUS Status ) RPC_STATUS Status )
{ {
TRACE("(%p, %p, %p, %d)\n", pStubMsg, pCommStatus, pFaultStatus, Status); TRACE("(%p, %p, %p, %ld)\n", pStubMsg, pCommStatus, pFaultStatus, Status);
switch (Status) switch (Status)
{ {

View file

@ -210,7 +210,7 @@ void WINAPI NDRCContextUnmarshall(NDR_CCONTEXT *CContext,
{ {
RPC_STATUS status; RPC_STATUS status;
TRACE("*%p=(%p) %p %p %08x\n", TRACE("*%p=(%p) %p %p %08lx\n",
CContext, *CContext, hBinding, pBuff, DataRepresentation); CContext, *CContext, hBinding, pBuff, DataRepresentation);
EnterCriticalSection(&ndr_context_cs); EnterCriticalSection(&ndr_context_cs);
@ -258,7 +258,7 @@ void WINAPI NDRSContextMarshall2(RPC_BINDING_HANDLE hBinding,
RPC_STATUS status; RPC_STATUS status;
ndr_context_handle *ndr = pBuff; ndr_context_handle *ndr = pBuff;
TRACE("(%p %p %p %p %p %u)\n", TRACE("(%p %p %p %p %p %lu)\n",
hBinding, SContext, pBuff, userRunDownIn, CtxGuard, Flags); hBinding, SContext, pBuff, userRunDownIn, CtxGuard, Flags);
if (!binding->server || !binding->Assoc) if (!binding->server || !binding->Assoc)
@ -298,7 +298,7 @@ void WINAPI NDRSContextMarshall2(RPC_BINDING_HANDLE hBinding,
NDR_SCONTEXT WINAPI NDRSContextUnmarshall(void *pBuff, NDR_SCONTEXT WINAPI NDRSContextUnmarshall(void *pBuff,
ULONG DataRepresentation) ULONG DataRepresentation)
{ {
TRACE("(%p %08x)\n", pBuff, DataRepresentation); TRACE("(%p %08lx)\n", pBuff, DataRepresentation);
return NDRSContextUnmarshall2(I_RpcGetCurrentCallHandle(), pBuff, return NDRSContextUnmarshall2(I_RpcGetCurrentCallHandle(), pBuff,
DataRepresentation, NULL, DataRepresentation, NULL,
RPC_CONTEXT_HANDLE_DEFAULT_FLAGS); RPC_CONTEXT_HANDLE_DEFAULT_FLAGS);
@ -311,7 +311,7 @@ NDR_SCONTEXT WINAPI NDRSContextUnmarshallEx(RPC_BINDING_HANDLE hBinding,
void *pBuff, void *pBuff,
ULONG DataRepresentation) ULONG DataRepresentation)
{ {
TRACE("(%p %p %08x)\n", hBinding, pBuff, DataRepresentation); TRACE("(%p %p %08lx)\n", hBinding, pBuff, DataRepresentation);
return NDRSContextUnmarshall2(hBinding, pBuff, DataRepresentation, NULL, return NDRSContextUnmarshall2(hBinding, pBuff, DataRepresentation, NULL,
RPC_CONTEXT_HANDLE_DEFAULT_FLAGS); RPC_CONTEXT_HANDLE_DEFAULT_FLAGS);
} }
@ -329,7 +329,7 @@ NDR_SCONTEXT WINAPI NDRSContextUnmarshall2(RPC_BINDING_HANDLE hBinding,
RPC_STATUS status; RPC_STATUS status;
const ndr_context_handle *context_ndr = pBuff; const ndr_context_handle *context_ndr = pBuff;
TRACE("(%p %p %08x %p %u)\n", TRACE("(%p %p %08lx %p %lu)\n",
hBinding, pBuff, DataRepresentation, CtxGuard, Flags); hBinding, pBuff, DataRepresentation, CtxGuard, Flags);
if (!binding->server || !binding->Assoc) if (!binding->server || !binding->Assoc)
@ -343,7 +343,7 @@ NDR_SCONTEXT WINAPI NDRSContextUnmarshall2(RPC_BINDING_HANDLE hBinding,
{ {
if (context_ndr->attributes) if (context_ndr->attributes)
{ {
ERR("non-null attributes 0x%x\n", context_ndr->attributes); ERR("non-null attributes 0x%lx\n", context_ndr->attributes);
status = RPC_X_SS_CONTEXT_MISMATCH; status = RPC_X_SS_CONTEXT_MISMATCH;
} }
else else

View file

@ -130,7 +130,7 @@ RPC_STATUS WINAPI MesBufferHandleReset(handle_t Handle, ULONG HandleStyle,
{ {
MIDL_ES_MESSAGE *pEsMsg = (MIDL_ES_MESSAGE *)Handle; MIDL_ES_MESSAGE *pEsMsg = (MIDL_ES_MESSAGE *)Handle;
TRACE("(%p, %u, %d, %p, %u, %p)\n", Handle, HandleStyle, Operation, Buffer, TRACE("(%p, %lu, %d, %p, %lu, %p)\n", Handle, HandleStyle, Operation, Buffer,
BufferSize, EncodedSize); BufferSize, EncodedSize);
if (!Handle || !Buffer || !EncodedSize) if (!Handle || !Buffer || !EncodedSize)
@ -186,7 +186,7 @@ RPC_STATUS RPC_ENTRY MesEncodeFixedBufferHandleCreate(
MIDL_ES_MESSAGE *pEsMsg; MIDL_ES_MESSAGE *pEsMsg;
RPC_STATUS status; RPC_STATUS status;
TRACE("(%p, %d, %p, %p)\n", Buffer, BufferSize, pEncodedSize, pHandle); TRACE("(%p, %ld, %p, %p)\n", Buffer, BufferSize, pEncodedSize, pHandle);
if ((status = validate_mes_buffer_pointer(Buffer))) if ((status = validate_mes_buffer_pointer(Buffer)))
return status; return status;
@ -251,7 +251,7 @@ RPC_STATUS RPC_ENTRY MesDecodeBufferHandleCreate(
MIDL_ES_MESSAGE *pEsMsg; MIDL_ES_MESSAGE *pEsMsg;
RPC_STATUS status; RPC_STATUS status;
TRACE("(%p, %d, %p)\n", Buffer, BufferSize, pHandle); TRACE("(%p, %ld, %p)\n", Buffer, BufferSize, pHandle);
if ((status = validate_mes_buffer_pointer(Buffer))) if ((status = validate_mes_buffer_pointer(Buffer)))
return status; return status;
@ -277,17 +277,17 @@ static void es_data_alloc(MIDL_ES_MESSAGE *pEsMsg, ULONG size)
if (pEsMsg->HandleStyle == MES_INCREMENTAL_HANDLE) if (pEsMsg->HandleStyle == MES_INCREMENTAL_HANDLE)
{ {
unsigned int tmpsize = size; unsigned int tmpsize = size;
TRACE("%d with incremental handle\n", size); TRACE("%ld with incremental handle\n", size);
pEsMsg->Alloc(pEsMsg->UserState, (char **)&pEsMsg->StubMsg.Buffer, &tmpsize); pEsMsg->Alloc(pEsMsg->UserState, (char **)&pEsMsg->StubMsg.Buffer, &tmpsize);
if (tmpsize < size) if (tmpsize < size)
{ {
ERR("not enough bytes allocated - requested %d, got %d\n", size, tmpsize); ERR("not enough bytes allocated - requested %ld, got %d\n", size, tmpsize);
RpcRaiseException(RPC_S_OUT_OF_MEMORY); RpcRaiseException(RPC_S_OUT_OF_MEMORY);
} }
} }
else if (pEsMsg->HandleStyle == MES_FIXED_BUFFER_HANDLE) else if (pEsMsg->HandleStyle == MES_FIXED_BUFFER_HANDLE)
{ {
TRACE("%d with fixed buffer handle\n", size); TRACE("%ld with fixed buffer handle\n", size);
pEsMsg->StubMsg.Buffer = pEsMsg->Buffer; pEsMsg->StubMsg.Buffer = pEsMsg->Buffer;
} }
pEsMsg->StubMsg.RpcMsg->Buffer = pEsMsg->StubMsg.BufferStart = pEsMsg->StubMsg.Buffer; pEsMsg->StubMsg.RpcMsg->Buffer = pEsMsg->StubMsg.BufferStart = pEsMsg->StubMsg.Buffer;
@ -298,17 +298,17 @@ static void es_data_read(MIDL_ES_MESSAGE *pEsMsg, ULONG size)
if (pEsMsg->HandleStyle == MES_INCREMENTAL_HANDLE) if (pEsMsg->HandleStyle == MES_INCREMENTAL_HANDLE)
{ {
unsigned int tmpsize = size; unsigned int tmpsize = size;
TRACE("%d from incremental handle\n", size); TRACE("%ld from incremental handle\n", size);
pEsMsg->Read(pEsMsg->UserState, (char **)&pEsMsg->StubMsg.Buffer, &tmpsize); pEsMsg->Read(pEsMsg->UserState, (char **)&pEsMsg->StubMsg.Buffer, &tmpsize);
if (tmpsize < size) if (tmpsize < size)
{ {
ERR("not enough bytes read - requested %d, got %d\n", size, tmpsize); ERR("not enough bytes read - requested %ld, got %d\n", size, tmpsize);
RpcRaiseException(RPC_S_OUT_OF_MEMORY); RpcRaiseException(RPC_S_OUT_OF_MEMORY);
} }
} }
else else
{ {
TRACE("%d from fixed or dynamic buffer handle\n", size); TRACE("%ld from fixed or dynamic buffer handle\n", size);
/* FIXME: validate BufferSize? */ /* FIXME: validate BufferSize? */
pEsMsg->StubMsg.Buffer = pEsMsg->Buffer; pEsMsg->StubMsg.Buffer = pEsMsg->Buffer;
pEsMsg->Buffer += size; pEsMsg->Buffer += size;
@ -323,12 +323,12 @@ static void es_data_write(MIDL_ES_MESSAGE *pEsMsg, ULONG size)
{ {
if (pEsMsg->HandleStyle == MES_INCREMENTAL_HANDLE) if (pEsMsg->HandleStyle == MES_INCREMENTAL_HANDLE)
{ {
TRACE("%d to incremental handle\n", size); TRACE("%ld to incremental handle\n", size);
pEsMsg->Write(pEsMsg->UserState, (char *)pEsMsg->StubMsg.BufferStart, size); pEsMsg->Write(pEsMsg->UserState, (char *)pEsMsg->StubMsg.BufferStart, size);
} }
else else
{ {
TRACE("%d to dynamic or fixed buffer handle\n", size); TRACE("%ld to dynamic or fixed buffer handle\n", size);
*pEsMsg->pEncodedSize += size; *pEsMsg->pEncodedSize += size;
} }
} }
@ -386,7 +386,7 @@ static void mes_proc_header_unmarshal(MIDL_ES_MESSAGE *pEsMsg)
pEsMsg->ProcNumber = *(DWORD *)pEsMsg->StubMsg.Buffer; pEsMsg->ProcNumber = *(DWORD *)pEsMsg->StubMsg.Buffer;
pEsMsg->StubMsg.Buffer += 4; pEsMsg->StubMsg.Buffer += 4;
if (*(DWORD *)pEsMsg->StubMsg.Buffer != 0x00000001) if (*(DWORD *)pEsMsg->StubMsg.Buffer != 0x00000001)
FIXME("unknown value 0x%08x, expected 0x00000001\n", *(DWORD *)pEsMsg->StubMsg.Buffer); FIXME("unknown value 0x%08lx, expected 0x00000001\n", *(DWORD *)pEsMsg->StubMsg.Buffer);
pEsMsg->StubMsg.Buffer += 4; pEsMsg->StubMsg.Buffer += 4;
pEsMsg->ByteCount = *(DWORD *)pEsMsg->StubMsg.Buffer; pEsMsg->ByteCount = *(DWORD *)pEsMsg->StubMsg.Buffer;
pEsMsg->StubMsg.Buffer += 4; pEsMsg->StubMsg.Buffer += 4;
@ -416,7 +416,7 @@ void WINAPIV NdrMesProcEncodeDecode(handle_t Handle, const MIDL_STUB_DESC * pStu
/* Later NDR language versions probably won't be backwards compatible */ /* Later NDR language versions probably won't be backwards compatible */
if (pStubDesc->Version > 0x50002) if (pStubDesc->Version > 0x50002)
{ {
FIXME("Incompatible stub description version: 0x%x\n", pStubDesc->Version); FIXME("Incompatible stub description version: 0x%lx\n", pStubDesc->Version);
RpcRaiseException(RPC_X_WRONG_STUB_VERSION); RpcRaiseException(RPC_X_WRONG_STUB_VERSION);
} }
@ -457,7 +457,7 @@ void WINAPIV NdrMesProcEncodeDecode(handle_t Handle, const MIDL_STUB_DESC * pStu
} }
TRACE("stack size: 0x%x\n", stack_size); TRACE("stack size: 0x%x\n", stack_size);
TRACE("proc num: %d\n", pEsMsg->ProcNumber); TRACE("proc num: %ld\n", pEsMsg->ProcNumber);
memset(&rpcMsg, 0, sizeof(rpcMsg)); memset(&rpcMsg, 0, sizeof(rpcMsg));
pEsMsg->StubMsg.RpcMsg = &rpcMsg; pEsMsg->StubMsg.RpcMsg = &rpcMsg;
@ -470,8 +470,8 @@ void WINAPIV NdrMesProcEncodeDecode(handle_t Handle, const MIDL_STUB_DESC * pStu
pEsMsg->StubMsg.FullPtrXlatTables = NdrFullPointerXlatInit(0,XLAT_CLIENT); pEsMsg->StubMsg.FullPtrXlatTables = NdrFullPointerXlatInit(0,XLAT_CLIENT);
TRACE("Oi_flags = 0x%02x\n", pProcHeader->Oi_flags); TRACE("Oi_flags = 0x%02x\n", pProcHeader->Oi_flags);
TRACE("stubdesc version = 0x%x\n", pStubDesc->Version); TRACE("stubdesc version = 0x%lx\n", pStubDesc->Version);
TRACE("MIDL stub version = 0x%x\n", pStubDesc->MIDLVersion); TRACE("MIDL stub version = 0x%lx\n", pStubDesc->MIDLVersion);
/* needed for conformance of top-level objects */ /* needed for conformance of top-level objects */
va_start( args, pFormat ); va_start( args, pFormat );

View file

@ -35,7 +35,7 @@ PFULL_PTR_XLAT_TABLES WINAPI NdrFullPointerXlatInit(ULONG NumberOfPointers,
ULONG NumberOfBuckets; ULONG NumberOfBuckets;
PFULL_PTR_XLAT_TABLES pXlatTables = HeapAlloc(GetProcessHeap(), 0, sizeof(*pXlatTables)); PFULL_PTR_XLAT_TABLES pXlatTables = HeapAlloc(GetProcessHeap(), 0, sizeof(*pXlatTables));
TRACE("(%d, %d)\n", NumberOfPointers, XlatSide); TRACE("(%ld, %d)\n", NumberOfPointers, XlatSide);
if (!NumberOfPointers) NumberOfPointers = 512; if (!NumberOfPointers) NumberOfPointers = 512;
NumberOfBuckets = ((NumberOfPointers + 3) & ~3) - 1; NumberOfBuckets = ((NumberOfPointers + 3) & ~3) - 1;
@ -48,7 +48,7 @@ PFULL_PTR_XLAT_TABLES WINAPI NdrFullPointerXlatInit(ULONG NumberOfPointers,
sizeof(unsigned char) * NumberOfPointers); sizeof(unsigned char) * NumberOfPointers);
pXlatTables->RefIdToPointer.NumberOfEntries = NumberOfPointers; pXlatTables->RefIdToPointer.NumberOfEntries = NumberOfPointers;
TRACE("NumberOfBuckets = %d\n", NumberOfBuckets); TRACE("NumberOfBuckets = %ld\n", NumberOfBuckets);
pXlatTables->PointerToRefId.XlatTable = pXlatTables->PointerToRefId.XlatTable =
HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(PFULL_PTR_TO_REFID_ELEMENT) * NumberOfBuckets); sizeof(PFULL_PTR_TO_REFID_ELEMENT) * NumberOfBuckets);
@ -159,7 +159,7 @@ int WINAPI NdrFullPointerQueryRefId(PFULL_PTR_XLAT_TABLES pXlatTables,
ULONG RefId, unsigned char QueryType, ULONG RefId, unsigned char QueryType,
void **ppPointer) void **ppPointer)
{ {
TRACE("(%p, 0x%x, %d, %p)\n", pXlatTables, RefId, QueryType, ppPointer); TRACE("(%p, 0x%lx, %d, %p)\n", pXlatTables, RefId, QueryType, ppPointer);
if (!RefId) if (!RefId)
return 1; return 1;
@ -192,7 +192,7 @@ void WINAPI NdrFullPointerInsertRefId(PFULL_PTR_XLAT_TABLES pXlatTables,
unsigned int i; unsigned int i;
PFULL_PTR_TO_REFID_ELEMENT XlatTableEntry; PFULL_PTR_TO_REFID_ELEMENT XlatTableEntry;
TRACE("(%p, 0x%x, %p)\n", pXlatTables, RefId, pPointer); TRACE("(%p, 0x%lx, %p)\n", pXlatTables, RefId, pPointer);
/* simple hashing algorithm, don't know whether it matches native */ /* simple hashing algorithm, don't know whether it matches native */
for (i = 0; i < sizeof(pPointer); i++) for (i = 0; i < sizeof(pPointer); i++)

View file

@ -121,9 +121,9 @@ static inline void align_pointer_offset_clear( unsigned char **ptr, unsigned cha
} }
#define STD_OVERFLOW_CHECK(_Msg) do { \ #define STD_OVERFLOW_CHECK(_Msg) do { \
TRACE("buffer=%d/%d\n", (ULONG)(_Msg->Buffer - (unsigned char *)_Msg->RpcMsg->Buffer), _Msg->BufferLength); \ TRACE("buffer=%ld/%ld\n", (ULONG)(_Msg->Buffer - (unsigned char *)_Msg->RpcMsg->Buffer), _Msg->BufferLength); \
if (_Msg->Buffer > (unsigned char *)_Msg->RpcMsg->Buffer + _Msg->BufferLength) \ if (_Msg->Buffer > (unsigned char *)_Msg->RpcMsg->Buffer + _Msg->BufferLength) \
ERR("buffer overflow %d bytes\n", (ULONG)(_Msg->Buffer - ((unsigned char *)_Msg->RpcMsg->Buffer + _Msg->BufferLength))); \ ERR("buffer overflow %ld bytes\n", (ULONG)(_Msg->Buffer - ((unsigned char *)_Msg->RpcMsg->Buffer + _Msg->BufferLength))); \
} while (0) } while (0)
#define NDR_POINTER_ID_BASE 0x20000 #define NDR_POINTER_ID_BASE 0x20000
@ -428,7 +428,7 @@ void * WINAPI NdrAllocate(MIDL_STUB_MESSAGE *pStubMsg, SIZE_T len)
/* check for overflow */ /* check for overflow */
if (adjusted_len < len) if (adjusted_len < len)
{ {
ERR("overflow of adjusted_len %ld, len %ld\n", adjusted_len, len); ERR("overflow of adjusted_len %Id, len %Id\n", adjusted_len, len);
RpcRaiseException(RPC_X_BAD_STUB_DATA); RpcRaiseException(RPC_X_BAD_STUB_DATA);
} }
@ -477,7 +477,7 @@ static PFORMAT_STRING ReadConformance(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRIN
RpcRaiseException(RPC_X_BAD_STUB_DATA); RpcRaiseException(RPC_X_BAD_STUB_DATA);
pStubMsg->MaxCount = NDR_LOCAL_UINT32_READ(pStubMsg->Buffer); pStubMsg->MaxCount = NDR_LOCAL_UINT32_READ(pStubMsg->Buffer);
pStubMsg->Buffer += 4; pStubMsg->Buffer += 4;
TRACE("unmarshalled conformance is %ld\n", pStubMsg->MaxCount); TRACE("unmarshalled conformance is %Id\n", pStubMsg->MaxCount);
return SkipConformance(pStubMsg, pFormat); return SkipConformance(pStubMsg, pFormat);
} }
@ -495,15 +495,15 @@ static inline PFORMAT_STRING ReadVariance(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_S
RpcRaiseException(RPC_X_BAD_STUB_DATA); RpcRaiseException(RPC_X_BAD_STUB_DATA);
pStubMsg->Offset = NDR_LOCAL_UINT32_READ(pStubMsg->Buffer); pStubMsg->Offset = NDR_LOCAL_UINT32_READ(pStubMsg->Buffer);
pStubMsg->Buffer += 4; pStubMsg->Buffer += 4;
TRACE("offset is %d\n", pStubMsg->Offset); TRACE("offset is %ld\n", pStubMsg->Offset);
pStubMsg->ActualCount = NDR_LOCAL_UINT32_READ(pStubMsg->Buffer); pStubMsg->ActualCount = NDR_LOCAL_UINT32_READ(pStubMsg->Buffer);
pStubMsg->Buffer += 4; pStubMsg->Buffer += 4;
TRACE("variance is %d\n", pStubMsg->ActualCount); TRACE("variance is %ld\n", pStubMsg->ActualCount);
if ((pStubMsg->ActualCount > MaxValue) || if ((pStubMsg->ActualCount > MaxValue) ||
(pStubMsg->ActualCount + pStubMsg->Offset > MaxValue)) (pStubMsg->ActualCount + pStubMsg->Offset > MaxValue))
{ {
ERR("invalid array bound(s): ActualCount = %d, Offset = %d, MaxValue = %d\n", ERR("invalid array bound(s): ActualCount = %ld, Offset = %ld, MaxValue = %ld\n",
pStubMsg->ActualCount, pStubMsg->Offset, MaxValue); pStubMsg->ActualCount, pStubMsg->Offset, MaxValue);
RpcRaiseException(RPC_S_INVALID_BOUND); RpcRaiseException(RPC_S_INVALID_BOUND);
return NULL; return NULL;
@ -589,7 +589,7 @@ PFORMAT_STRING ComputeConformanceOrVariance(
break; break;
case FC_CONSTANT_CONFORMANCE: case FC_CONSTANT_CONFORMANCE:
data = ofs | ((DWORD)pFormat[1] << 16); data = ofs | ((DWORD)pFormat[1] << 16);
TRACE("constant conformance, val=%ld\n", data); TRACE("constant conformance, val=%Id\n", data);
*pCount = data; *pCount = data;
goto finish_conf; goto finish_conf;
case FC_TOP_LEVEL_MULTID_CONFORMANCE: case FC_TOP_LEVEL_MULTID_CONFORMANCE:
@ -661,7 +661,7 @@ PFORMAT_STRING ComputeConformanceOrVariance(
FIXME("unknown conformance data type %x\n", dtype); FIXME("unknown conformance data type %x\n", dtype);
goto done_conf_grab; goto done_conf_grab;
} }
TRACE("dereferenced data type %x at %p, got %ld\n", dtype, ptr, data); TRACE("dereferenced data type %x at %p, got %Id\n", dtype, ptr, data);
done_conf_grab: done_conf_grab:
switch (pFormat[1]) { switch (pFormat[1]) {
@ -687,7 +687,7 @@ done_conf_grab:
} }
finish_conf: finish_conf:
TRACE("resulting conformance is %ld\n", *pCount); TRACE("resulting conformance is %Id\n", *pCount);
return SkipConformance(pStubMsg, pFormat); return SkipConformance(pStubMsg, pFormat);
} }
@ -722,7 +722,7 @@ static inline void safe_buffer_length_increment(MIDL_STUB_MESSAGE *pStubMsg, ULO
{ {
if (pStubMsg->BufferLength + size < pStubMsg->BufferLength) /* integer overflow of pStubMsg->BufferSize */ if (pStubMsg->BufferLength + size < pStubMsg->BufferLength) /* integer overflow of pStubMsg->BufferSize */
{ {
ERR("buffer length overflow - BufferLength = %u, size = %u\n", ERR("buffer length overflow - BufferLength = %lu, size = %lu\n",
pStubMsg->BufferLength, size); pStubMsg->BufferLength, size);
RpcRaiseException(RPC_X_BAD_STUB_DATA); RpcRaiseException(RPC_X_BAD_STUB_DATA);
} }
@ -736,7 +736,7 @@ static inline void safe_copy_from_buffer(MIDL_STUB_MESSAGE *pStubMsg, void *p, U
if ((pStubMsg->Buffer + size < pStubMsg->Buffer) || /* integer overflow of pStubMsg->Buffer */ if ((pStubMsg->Buffer + size < pStubMsg->Buffer) || /* integer overflow of pStubMsg->Buffer */
(pStubMsg->Buffer + size > pStubMsg->BufferEnd)) (pStubMsg->Buffer + size > pStubMsg->BufferEnd))
{ {
ERR("buffer overflow - Buffer = %p, BufferEnd = %p, size = %u\n", ERR("buffer overflow - Buffer = %p, BufferEnd = %p, size = %lu\n",
pStubMsg->Buffer, pStubMsg->BufferEnd, size); pStubMsg->Buffer, pStubMsg->BufferEnd, size);
RpcRaiseException(RPC_X_BAD_STUB_DATA); RpcRaiseException(RPC_X_BAD_STUB_DATA);
} }
@ -752,7 +752,7 @@ static inline void safe_copy_to_buffer(MIDL_STUB_MESSAGE *pStubMsg, const void *
if ((pStubMsg->Buffer + size < pStubMsg->Buffer) || /* integer overflow of pStubMsg->Buffer */ if ((pStubMsg->Buffer + size < pStubMsg->Buffer) || /* integer overflow of pStubMsg->Buffer */
(pStubMsg->Buffer + size > (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength)) (pStubMsg->Buffer + size > (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength))
{ {
ERR("buffer overflow - Buffer = %p, BufferEnd = %p, size = %u\n", ERR("buffer overflow - Buffer = %p, BufferEnd = %p, size = %lu\n",
pStubMsg->Buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength, pStubMsg->Buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength,
size); size);
RpcRaiseException(RPC_X_BAD_STUB_DATA); RpcRaiseException(RPC_X_BAD_STUB_DATA);
@ -771,7 +771,7 @@ static void validate_string_data(MIDL_STUB_MESSAGE *pStubMsg, ULONG bufsize, ULO
if ((pStubMsg->Buffer + bufsize < pStubMsg->Buffer) || if ((pStubMsg->Buffer + bufsize < pStubMsg->Buffer) ||
(pStubMsg->Buffer + bufsize > pStubMsg->BufferEnd)) (pStubMsg->Buffer + bufsize > pStubMsg->BufferEnd))
{ {
ERR("bufsize 0x%x exceeded buffer end %p of buffer %p\n", bufsize, ERR("bufsize 0x%lx exceeded buffer end %p of buffer %p\n", bufsize,
pStubMsg->BufferEnd, pStubMsg->Buffer); pStubMsg->BufferEnd, pStubMsg->Buffer);
RpcRaiseException(RPC_X_BAD_STUB_DATA); RpcRaiseException(RPC_X_BAD_STUB_DATA);
} }
@ -779,14 +779,14 @@ static void validate_string_data(MIDL_STUB_MESSAGE *pStubMsg, ULONG bufsize, ULO
/* strings must always have null terminating bytes */ /* strings must always have null terminating bytes */
if (bufsize < esize) if (bufsize < esize)
{ {
ERR("invalid string length of %d\n", bufsize / esize); ERR("invalid string length of %ld\n", bufsize / esize);
RpcRaiseException(RPC_S_INVALID_BOUND); RpcRaiseException(RPC_S_INVALID_BOUND);
} }
for (i = bufsize - esize; i < bufsize; i++) for (i = bufsize - esize; i < bufsize; i++)
if (pStubMsg->Buffer[i] != 0) if (pStubMsg->Buffer[i] != 0)
{ {
ERR("string not null-terminated at byte position %d, data is 0x%x\n", ERR("string not null-terminated at byte position %ld, data is 0x%x\n",
i, pStubMsg->Buffer[i]); i, pStubMsg->Buffer[i]);
RpcRaiseException(RPC_S_INVALID_BOUND); RpcRaiseException(RPC_S_INVALID_BOUND);
} }
@ -843,13 +843,13 @@ static void PointerMarshall(PMIDL_STUB_MESSAGE pStubMsg,
else else
pointer_needs_marshaling = FALSE; pointer_needs_marshaling = FALSE;
pointer_id = Pointer ? NDR_POINTER_ID(pStubMsg) : 0; pointer_id = Pointer ? NDR_POINTER_ID(pStubMsg) : 0;
TRACE("writing 0x%08x to buffer\n", pointer_id); TRACE("writing 0x%08lx to buffer\n", pointer_id);
NDR_LOCAL_UINT32_WRITE(Buffer, pointer_id); NDR_LOCAL_UINT32_WRITE(Buffer, pointer_id);
break; break;
case FC_FP: case FC_FP:
pointer_needs_marshaling = !NdrFullPointerQueryPointer( pointer_needs_marshaling = !NdrFullPointerQueryPointer(
pStubMsg->FullPtrXlatTables, Pointer, 1, &pointer_id); pStubMsg->FullPtrXlatTables, Pointer, 1, &pointer_id);
TRACE("writing 0x%08x to buffer\n", pointer_id); TRACE("writing 0x%08lx to buffer\n", pointer_id);
NDR_LOCAL_UINT32_WRITE(Buffer, pointer_id); NDR_LOCAL_UINT32_WRITE(Buffer, pointer_id);
break; break;
default: default:
@ -905,7 +905,7 @@ static void PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
break; break;
case FC_UP: /* unique pointer */ case FC_UP: /* unique pointer */
pointer_id = NDR_LOCAL_UINT32_READ(Buffer); pointer_id = NDR_LOCAL_UINT32_READ(Buffer);
TRACE("pointer_id is 0x%08x\n", pointer_id); TRACE("pointer_id is 0x%08lx\n", pointer_id);
if (pointer_id) if (pointer_id)
pointer_needs_unmarshaling = TRUE; pointer_needs_unmarshaling = TRUE;
else { else {
@ -915,7 +915,7 @@ static void PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
break; break;
case FC_OP: /* object pointer - we must free data before overwriting it */ case FC_OP: /* object pointer - we must free data before overwriting it */
pointer_id = NDR_LOCAL_UINT32_READ(Buffer); pointer_id = NDR_LOCAL_UINT32_READ(Buffer);
TRACE("pointer_id is 0x%08x\n", pointer_id); TRACE("pointer_id is 0x%08lx\n", pointer_id);
/* An object pointer always allocates new memory (it cannot point to the /* An object pointer always allocates new memory (it cannot point to the
* buffer). */ * buffer). */
@ -933,7 +933,7 @@ static void PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
break; break;
case FC_FP: case FC_FP:
pointer_id = NDR_LOCAL_UINT32_READ(Buffer); pointer_id = NDR_LOCAL_UINT32_READ(Buffer);
TRACE("pointer_id is 0x%08x\n", pointer_id); TRACE("pointer_id is 0x%08lx\n", pointer_id);
pointer_needs_unmarshaling = !NdrFullPointerQueryRefId( pointer_needs_unmarshaling = !NdrFullPointerQueryRefId(
pStubMsg->FullPtrXlatTables, pointer_id, 1, (void **)pPointer); pStubMsg->FullPtrXlatTables, pointer_id, 1, (void **)pPointer);
break; break;
@ -1079,7 +1079,7 @@ static ULONG PointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
case FC_UP: /* unique pointer */ case FC_UP: /* unique pointer */
case FC_OP: /* object pointer - we must free data before overwriting it */ case FC_OP: /* object pointer - we must free data before overwriting it */
pointer_id = NDR_LOCAL_UINT32_READ(Buffer); pointer_id = NDR_LOCAL_UINT32_READ(Buffer);
TRACE("pointer_id is 0x%08x\n", pointer_id); TRACE("pointer_id is 0x%08lx\n", pointer_id);
if (pointer_id) if (pointer_id)
pointer_needs_sizing = TRUE; pointer_needs_sizing = TRUE;
else else
@ -1089,7 +1089,7 @@ static ULONG PointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
{ {
void *pointer; void *pointer;
pointer_id = NDR_LOCAL_UINT32_READ(Buffer); pointer_id = NDR_LOCAL_UINT32_READ(Buffer);
TRACE("pointer_id is 0x%08x\n", pointer_id); TRACE("pointer_id is 0x%08lx\n", pointer_id);
pointer_needs_sizing = !NdrFullPointerQueryRefId( pointer_needs_sizing = !NdrFullPointerQueryRefId(
pStubMsg->FullPtrXlatTables, pointer_id, 1, &pointer); pStubMsg->FullPtrXlatTables, pointer_id, 1, &pointer);
break; break;
@ -1693,7 +1693,7 @@ void WINAPI NdrSimpleTypeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char*
case FC_ERROR_STATUS_T: case FC_ERROR_STATUS_T:
case FC_ENUM32: case FC_ENUM32:
BASE_TYPE_UNMARSHALL(ULONG); BASE_TYPE_UNMARSHALL(ULONG);
TRACE("value: 0x%08x\n", *(ULONG *)pMemory); TRACE("value: 0x%08lx\n", *(ULONG *)pMemory);
break; break;
case FC_FLOAT: case FC_FLOAT:
BASE_TYPE_UNMARSHALL(float); BASE_TYPE_UNMARSHALL(float);
@ -1720,14 +1720,14 @@ void WINAPI NdrSimpleTypeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char*
/* 32-bits on the wire, but int_ptr in memory */ /* 32-bits on the wire, but int_ptr in memory */
*(INT_PTR *)pMemory = *(INT *)pStubMsg->Buffer; *(INT_PTR *)pMemory = *(INT *)pStubMsg->Buffer;
pStubMsg->Buffer += sizeof(INT); pStubMsg->Buffer += sizeof(INT);
TRACE("value: 0x%08lx\n", *(INT_PTR *)pMemory); TRACE("value: 0x%08Ix\n", *(INT_PTR *)pMemory);
break; break;
case FC_UINT3264: case FC_UINT3264:
align_pointer(&pStubMsg->Buffer, sizeof(UINT)); align_pointer(&pStubMsg->Buffer, sizeof(UINT));
/* 32-bits on the wire, but int_ptr in memory */ /* 32-bits on the wire, but int_ptr in memory */
*(UINT_PTR *)pMemory = *(UINT *)pStubMsg->Buffer; *(UINT_PTR *)pMemory = *(UINT *)pStubMsg->Buffer;
pStubMsg->Buffer += sizeof(UINT); pStubMsg->Buffer += sizeof(UINT);
TRACE("value: 0x%08lx\n", *(UINT_PTR *)pMemory); TRACE("value: 0x%08Ix\n", *(UINT_PTR *)pMemory);
break; break;
case FC_IGNORE: case FC_IGNORE:
break; break;
@ -2225,13 +2225,13 @@ static inline ULONG array_read_variance_and_unmarshall(
if (pFormat[1] != FC_STRING_SIZED && (pStubMsg->MaxCount != pStubMsg->ActualCount)) if (pFormat[1] != FC_STRING_SIZED && (pStubMsg->MaxCount != pStubMsg->ActualCount))
{ {
ERR("buffer size %d must equal memory size %ld for non-sized conformant strings\n", ERR("buffer size %ld must equal memory size %Id for non-sized conformant strings\n",
pStubMsg->ActualCount, pStubMsg->MaxCount); pStubMsg->ActualCount, pStubMsg->MaxCount);
RpcRaiseException(RPC_S_INVALID_BOUND); RpcRaiseException(RPC_S_INVALID_BOUND);
} }
if (pStubMsg->Offset) if (pStubMsg->Offset)
{ {
ERR("conformant strings can't have Offset (%d)\n", pStubMsg->Offset); ERR("conformant strings can't have Offset (%ld)\n", pStubMsg->Offset);
RpcRaiseException(RPC_S_INVALID_BOUND); RpcRaiseException(RPC_S_INVALID_BOUND);
} }
@ -2356,13 +2356,13 @@ static inline void array_memory_size(
if (pFormat[1] != FC_STRING_SIZED && (pStubMsg->MaxCount != pStubMsg->ActualCount)) if (pFormat[1] != FC_STRING_SIZED && (pStubMsg->MaxCount != pStubMsg->ActualCount))
{ {
ERR("buffer size %d must equal memory size %ld for non-sized conformant strings\n", ERR("buffer size %ld must equal memory size %Id for non-sized conformant strings\n",
pStubMsg->ActualCount, pStubMsg->MaxCount); pStubMsg->ActualCount, pStubMsg->MaxCount);
RpcRaiseException(RPC_S_INVALID_BOUND); RpcRaiseException(RPC_S_INVALID_BOUND);
} }
if (pStubMsg->Offset) if (pStubMsg->Offset)
{ {
ERR("conformant strings can't have Offset (%d)\n", pStubMsg->Offset); ERR("conformant strings can't have Offset (%ld)\n", pStubMsg->Offset);
RpcRaiseException(RPC_S_INVALID_BOUND); RpcRaiseException(RPC_S_INVALID_BOUND);
} }
@ -2636,7 +2636,7 @@ unsigned char * WINAPI NdrNonConformantStringUnmarshall(PMIDL_STUB_MESSAGE pStu
ReadVariance(pStubMsg, NULL, maxsize); ReadVariance(pStubMsg, NULL, maxsize);
if (pStubMsg->Offset) if (pStubMsg->Offset)
{ {
ERR("non-conformant strings can't have Offset (%d)\n", pStubMsg->Offset); ERR("non-conformant strings can't have Offset (%ld)\n", pStubMsg->Offset);
RpcRaiseException(RPC_S_INVALID_BOUND); RpcRaiseException(RPC_S_INVALID_BOUND);
} }
@ -2728,7 +2728,7 @@ ULONG WINAPI NdrNonConformantStringMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
if (pStubMsg->Offset) if (pStubMsg->Offset)
{ {
ERR("non-conformant strings can't have Offset (%d)\n", pStubMsg->Offset); ERR("non-conformant strings can't have Offset (%ld)\n", pStubMsg->Offset);
RpcRaiseException(RPC_S_INVALID_BOUND); RpcRaiseException(RPC_S_INVALID_BOUND);
} }
@ -2869,7 +2869,7 @@ static unsigned char * ComplexMarshall(PMIDL_STUB_MESSAGE pStubMsg,
case FC_ENUM16: case FC_ENUM16:
{ {
USHORT val = *(DWORD *)pMemory; USHORT val = *(DWORD *)pMemory;
TRACE("enum16=%d <= %p\n", *(DWORD*)pMemory, pMemory); TRACE("enum16=%ld <= %p\n", *(DWORD*)pMemory, pMemory);
if (32767 < *(DWORD*)pMemory) if (32767 < *(DWORD*)pMemory)
RpcRaiseException(RPC_X_ENUM_VALUE_OUT_OF_RANGE); RpcRaiseException(RPC_X_ENUM_VALUE_OUT_OF_RANGE);
safe_copy_to_buffer(pStubMsg, &val, 2); safe_copy_to_buffer(pStubMsg, &val, 2);
@ -2879,7 +2879,7 @@ static unsigned char * ComplexMarshall(PMIDL_STUB_MESSAGE pStubMsg,
case FC_LONG: case FC_LONG:
case FC_ULONG: case FC_ULONG:
case FC_ENUM32: case FC_ENUM32:
TRACE("long=%d <= %p\n", *(DWORD*)pMemory, pMemory); TRACE("long=%ld <= %p\n", *(DWORD*)pMemory, pMemory);
safe_copy_to_buffer(pStubMsg, pMemory, 4); safe_copy_to_buffer(pStubMsg, pMemory, 4);
pMemory += 4; pMemory += 4;
break; break;
@ -2887,7 +2887,7 @@ static unsigned char * ComplexMarshall(PMIDL_STUB_MESSAGE pStubMsg,
case FC_UINT3264: case FC_UINT3264:
{ {
UINT val = *(UINT_PTR *)pMemory; UINT val = *(UINT_PTR *)pMemory;
TRACE("int3264=%ld <= %p\n", *(UINT_PTR *)pMemory, pMemory); TRACE("int3264=%Id <= %p\n", *(UINT_PTR *)pMemory, pMemory);
safe_copy_to_buffer(pStubMsg, &val, sizeof(UINT)); safe_copy_to_buffer(pStubMsg, &val, sizeof(UINT));
pMemory += sizeof(UINT_PTR); pMemory += sizeof(UINT_PTR);
break; break;
@ -2970,7 +2970,7 @@ static unsigned char * ComplexMarshall(PMIDL_STUB_MESSAGE pStubMsg,
pFormat += 2; pFormat += 2;
desc = pFormat + *(const SHORT*)pFormat; desc = pFormat + *(const SHORT*)pFormat;
size = EmbeddedComplexSize(pStubMsg, desc); size = EmbeddedComplexSize(pStubMsg, desc);
TRACE("embedded complex (size=%d) <= %p\n", size, pMemory); TRACE("embedded complex (size=%ld) <= %p\n", size, pMemory);
m = NdrMarshaller[*desc & NDR_TABLE_MASK]; m = NdrMarshaller[*desc & NDR_TABLE_MASK];
if (m) if (m)
{ {
@ -3031,7 +3031,7 @@ static unsigned char * ComplexUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
WORD val; WORD val;
safe_copy_from_buffer(pStubMsg, &val, 2); safe_copy_from_buffer(pStubMsg, &val, 2);
*(DWORD*)pMemory = val; *(DWORD*)pMemory = val;
TRACE("enum16=%d => %p\n", *(DWORD*)pMemory, pMemory); TRACE("enum16=%ld => %p\n", *(DWORD*)pMemory, pMemory);
if (32767 < *(DWORD*)pMemory) if (32767 < *(DWORD*)pMemory)
RpcRaiseException(RPC_X_ENUM_VALUE_OUT_OF_RANGE); RpcRaiseException(RPC_X_ENUM_VALUE_OUT_OF_RANGE);
pMemory += 4; pMemory += 4;
@ -3041,7 +3041,7 @@ static unsigned char * ComplexUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
case FC_ULONG: case FC_ULONG:
case FC_ENUM32: case FC_ENUM32:
safe_copy_from_buffer(pStubMsg, pMemory, 4); safe_copy_from_buffer(pStubMsg, pMemory, 4);
TRACE("long=%d => %p\n", *(DWORD*)pMemory, pMemory); TRACE("long=%ld => %p\n", *(DWORD*)pMemory, pMemory);
pMemory += 4; pMemory += 4;
break; break;
case FC_INT3264: case FC_INT3264:
@ -3049,7 +3049,7 @@ static unsigned char * ComplexUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
INT val; INT val;
safe_copy_from_buffer(pStubMsg, &val, 4); safe_copy_from_buffer(pStubMsg, &val, 4);
*(INT_PTR *)pMemory = val; *(INT_PTR *)pMemory = val;
TRACE("int3264=%ld => %p\n", *(INT_PTR*)pMemory, pMemory); TRACE("int3264=%Id => %p\n", *(INT_PTR*)pMemory, pMemory);
pMemory += sizeof(INT_PTR); pMemory += sizeof(INT_PTR);
break; break;
} }
@ -3058,7 +3058,7 @@ static unsigned char * ComplexUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
UINT val; UINT val;
safe_copy_from_buffer(pStubMsg, &val, 4); safe_copy_from_buffer(pStubMsg, &val, 4);
*(UINT_PTR *)pMemory = val; *(UINT_PTR *)pMemory = val;
TRACE("uint3264=%ld => %p\n", *(UINT_PTR*)pMemory, pMemory); TRACE("uint3264=%Id => %p\n", *(UINT_PTR*)pMemory, pMemory);
pMemory += sizeof(UINT_PTR); pMemory += sizeof(UINT_PTR);
break; break;
} }
@ -3140,7 +3140,7 @@ static unsigned char * ComplexUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
pFormat += 2; pFormat += 2;
desc = pFormat + *(const SHORT*)pFormat; desc = pFormat + *(const SHORT*)pFormat;
size = EmbeddedComplexSize(pStubMsg, desc); size = EmbeddedComplexSize(pStubMsg, desc);
TRACE("embedded complex (size=%d) => %p\n", size, pMemory); TRACE("embedded complex (size=%ld) => %p\n", size, pMemory);
if (fMustAlloc) if (fMustAlloc)
/* we can't pass fMustAlloc=TRUE into the marshaller for this type /* we can't pass fMustAlloc=TRUE into the marshaller for this type
* since the type is part of the memory block that is encompassed by * since the type is part of the memory block that is encompassed by
@ -3629,7 +3629,7 @@ unsigned char * WINAPI NdrComplexStructMarshall(PMIDL_STUB_MESSAGE pStubMsg,
/* save it for use by embedded pointer code later */ /* save it for use by embedded pointer code later */
pStubMsg->PointerBufferMark = (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength; pStubMsg->PointerBufferMark = (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength;
TRACE("difference = 0x%x\n", (ULONG)(pStubMsg->PointerBufferMark - pStubMsg->Buffer)); TRACE("difference = 0x%lx\n", (ULONG)(pStubMsg->PointerBufferMark - pStubMsg->Buffer));
pointer_buffer_mark_set = TRUE; pointer_buffer_mark_set = TRUE;
/* restore the original buffer length */ /* restore the original buffer length */
@ -3715,7 +3715,7 @@ unsigned char * WINAPI NdrComplexStructUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
/* save it for use by embedded pointer code later */ /* save it for use by embedded pointer code later */
pStubMsg->PointerBufferMark = pStubMsg->Buffer; pStubMsg->PointerBufferMark = pStubMsg->Buffer;
TRACE("difference = 0x%x\n", (ULONG)(pStubMsg->PointerBufferMark - saved_buffer)); TRACE("difference = 0x%lx\n", (ULONG)(pStubMsg->PointerBufferMark - saved_buffer));
pointer_buffer_mark_set = TRUE; pointer_buffer_mark_set = TRUE;
/* restore the original buffer */ /* restore the original buffer */
@ -3803,7 +3803,7 @@ void WINAPI NdrComplexStructBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
/* save it for use by embedded pointer code later */ /* save it for use by embedded pointer code later */
pStubMsg->PointerLength = pStubMsg->BufferLength; pStubMsg->PointerLength = pStubMsg->BufferLength;
pointer_length_set = 1; pointer_length_set = 1;
TRACE("difference = 0x%x\n", pStubMsg->PointerLength - saved_buffer_length); TRACE("difference = 0x%lx\n", pStubMsg->PointerLength - saved_buffer_length);
/* restore the original buffer length */ /* restore the original buffer length */
pStubMsg->BufferLength = saved_buffer_length; pStubMsg->BufferLength = saved_buffer_length;
@ -4186,7 +4186,7 @@ unsigned char * WINAPI NdrComplexArrayMarshall(PMIDL_STUB_MESSAGE pStubMsg,
/* save it for use by embedded pointer code later */ /* save it for use by embedded pointer code later */
pStubMsg->PointerBufferMark = (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength; pStubMsg->PointerBufferMark = (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength;
TRACE("difference = 0x%x\n", (ULONG)(pStubMsg->Buffer - (unsigned char *)pStubMsg->RpcMsg->Buffer)); TRACE("difference = 0x%lx\n", (ULONG)(pStubMsg->Buffer - (unsigned char *)pStubMsg->RpcMsg->Buffer));
pointer_buffer_mark_set = TRUE; pointer_buffer_mark_set = TRUE;
/* restore fields */ /* restore fields */
@ -4242,7 +4242,7 @@ unsigned char * WINAPI NdrComplexArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
NdrComplexArrayMemorySize(pStubMsg, pFormat); NdrComplexArrayMemorySize(pStubMsg, pFormat);
pStubMsg->IgnoreEmbeddedPointers = saved_ignore_embedded; pStubMsg->IgnoreEmbeddedPointers = saved_ignore_embedded;
TRACE("difference = 0x%x\n", (ULONG)(pStubMsg->Buffer - saved_buffer)); TRACE("difference = 0x%lx\n", (ULONG)(pStubMsg->Buffer - saved_buffer));
if (!pStubMsg->PointerBufferMark) if (!pStubMsg->PointerBufferMark)
{ {
/* save it for use by embedded pointer code later */ /* save it for use by embedded pointer code later */
@ -4362,10 +4362,10 @@ void WINAPI NdrComplexArrayFree(PMIDL_STUB_MESSAGE pStubMsg,
pFormat += 4; pFormat += 4;
pFormat = ComputeConformance(pStubMsg, pMemory, pFormat, def); pFormat = ComputeConformance(pStubMsg, pMemory, pFormat, def);
TRACE("conformance = %ld\n", pStubMsg->MaxCount); TRACE("conformance = %Id\n", pStubMsg->MaxCount);
pFormat = ComputeVariance(pStubMsg, pMemory, pFormat, pStubMsg->MaxCount); pFormat = ComputeVariance(pStubMsg, pMemory, pFormat, pStubMsg->MaxCount);
TRACE("variance = %d\n", pStubMsg->ActualCount); TRACE("variance = %ld\n", pStubMsg->ActualCount);
count = pStubMsg->ActualCount; count = pStubMsg->ActualCount;
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
@ -4533,7 +4533,7 @@ void WINAPI NdrUserMarshalBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
align_length(&pStubMsg->BufferLength, (flags & 0xf) + 1); align_length(&pStubMsg->BufferLength, (flags & 0xf) + 1);
if (bufsize) { if (bufsize) {
TRACE("size=%d\n", bufsize); TRACE("size=%ld\n", bufsize);
safe_buffer_length_increment(pStubMsg, bufsize); safe_buffer_length_increment(pStubMsg, bufsize);
} }
else else
@ -4612,7 +4612,7 @@ RPC_STATUS RPC_ENTRY NdrGetUserMarshalInfo(ULONG *flags, ULONG level, NDR_USER_M
{ {
USER_MARSHAL_CB *umcb = CONTAINING_RECORD(flags, USER_MARSHAL_CB, Flags); USER_MARSHAL_CB *umcb = CONTAINING_RECORD(flags, USER_MARSHAL_CB, Flags);
TRACE("(%p,%u,%p)\n", flags, level, umi); TRACE("(%p,%lu,%p)\n", flags, level, umi);
if (level != 1) if (level != 1)
return RPC_S_INVALID_ARG; return RPC_S_INVALID_ARG;
@ -4680,7 +4680,7 @@ void WINAPI NdrConvert( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat )
*/ */
void WINAPI NdrConvert2( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, LONG NumberParams ) void WINAPI NdrConvert2( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, LONG NumberParams )
{ {
FIXME("(pStubMsg == ^%p, pFormat == ^%p, NumberParams == %d): stub.\n", FIXME("(pStubMsg == ^%p, pFormat == ^%p, NumberParams == %ld): stub.\n",
pStubMsg, pFormat, NumberParams); pStubMsg, pFormat, NumberParams);
/* FIXME: since this stub doesn't do any converting, the proper behavior /* FIXME: since this stub doesn't do any converting, the proper behavior
is to raise an exception */ is to raise an exception */
@ -4739,7 +4739,7 @@ unsigned char * WINAPI NdrConformantStructMarshall(PMIDL_STUB_MESSAGE pStubMsg,
bufsize = safe_multiply(esize, pStubMsg->MaxCount); bufsize = safe_multiply(esize, pStubMsg->MaxCount);
if (pCStructFormat->memory_size + bufsize < pCStructFormat->memory_size) /* integer overflow */ if (pCStructFormat->memory_size + bufsize < pCStructFormat->memory_size) /* integer overflow */
{ {
ERR("integer overflow of memory_size %u with bufsize %u\n", ERR("integer overflow of memory_size %u with bufsize %lu\n",
pCStructFormat->memory_size, bufsize); pCStructFormat->memory_size, bufsize);
RpcRaiseException(RPC_X_BAD_STUB_DATA); RpcRaiseException(RPC_X_BAD_STUB_DATA);
} }
@ -4794,7 +4794,7 @@ unsigned char * WINAPI NdrConformantStructUnmarshall(PMIDL_STUB_MESSAGE pStubMs
bufsize = safe_multiply(esize, pStubMsg->MaxCount); bufsize = safe_multiply(esize, pStubMsg->MaxCount);
if (pCStructFormat->memory_size + bufsize < pCStructFormat->memory_size) /* integer overflow */ if (pCStructFormat->memory_size + bufsize < pCStructFormat->memory_size) /* integer overflow */
{ {
ERR("integer overflow of memory_size %u with bufsize %u\n", ERR("integer overflow of memory_size %u with bufsize %lu\n",
pCStructFormat->memory_size, bufsize); pCStructFormat->memory_size, bufsize);
RpcRaiseException(RPC_X_BAD_STUB_DATA); RpcRaiseException(RPC_X_BAD_STUB_DATA);
} }
@ -5706,13 +5706,13 @@ static PFORMAT_STRING get_arm_offset_from_union_arm_selector(PMIDL_STUB_MESSAGE
{ {
if(type == 0xffff) if(type == 0xffff)
{ {
ERR("no arm for 0x%x and no default case\n", discriminant); ERR("no arm for 0x%lx and no default case\n", discriminant);
RpcRaiseException(RPC_S_INVALID_TAG); RpcRaiseException(RPC_S_INVALID_TAG);
return NULL; return NULL;
} }
if(type == 0) if(type == 0)
{ {
TRACE("falling back to empty default case for 0x%x\n", discriminant); TRACE("falling back to empty default case for 0x%lx\n", discriminant);
return NULL; return NULL;
} }
} }
@ -6032,7 +6032,7 @@ unsigned char * WINAPI NdrEncapsulatedUnionMarshall(PMIDL_STUB_MESSAGE pStubMsg
align_pointer_clear(&pStubMsg->Buffer, increment); align_pointer_clear(&pStubMsg->Buffer, increment);
switch_value = get_discriminant(switch_type, pMemory); switch_value = get_discriminant(switch_type, pMemory);
TRACE("got switch value 0x%x\n", switch_value); TRACE("got switch value 0x%lx\n", switch_value);
NdrBaseTypeMarshall(pStubMsg, pMemory, &switch_type); NdrBaseTypeMarshall(pStubMsg, pMemory, &switch_type);
pMemory += increment; pMemory += increment;
@ -6063,7 +6063,7 @@ unsigned char * WINAPI NdrEncapsulatedUnionUnmarshall(PMIDL_STUB_MESSAGE pStubM
align_pointer(&pStubMsg->Buffer, increment); align_pointer(&pStubMsg->Buffer, increment);
switch_value = get_discriminant(switch_type, pStubMsg->Buffer); switch_value = get_discriminant(switch_type, pStubMsg->Buffer);
TRACE("got switch value 0x%x\n", switch_value); TRACE("got switch value 0x%lx\n", switch_value);
size = *(const unsigned short*)pFormat + increment; size = *(const unsigned short*)pFormat + increment;
if (!fMustAlloc && !*ppMemory) if (!fMustAlloc && !*ppMemory)
@ -6105,7 +6105,7 @@ void WINAPI NdrEncapsulatedUnionBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
align_length(&pStubMsg->BufferLength, increment); align_length(&pStubMsg->BufferLength, increment);
switch_value = get_discriminant(switch_type, pMemory); switch_value = get_discriminant(switch_type, pMemory);
TRACE("got switch value 0x%x\n", switch_value); TRACE("got switch value 0x%lx\n", switch_value);
/* Add discriminant size */ /* Add discriminant size */
NdrBaseTypeBufferSize(pStubMsg, (unsigned char *)&switch_value, &switch_type); NdrBaseTypeBufferSize(pStubMsg, (unsigned char *)&switch_value, &switch_type);
@ -6130,7 +6130,7 @@ ULONG WINAPI NdrEncapsulatedUnionMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
align_pointer(&pStubMsg->Buffer, increment); align_pointer(&pStubMsg->Buffer, increment);
switch_value = get_discriminant(switch_type, pStubMsg->Buffer); switch_value = get_discriminant(switch_type, pStubMsg->Buffer);
TRACE("got switch value 0x%x\n", switch_value); TRACE("got switch value 0x%lx\n", switch_value);
pStubMsg->Memory += increment; pStubMsg->Memory += increment;
@ -6156,7 +6156,7 @@ void WINAPI NdrEncapsulatedUnionFree(PMIDL_STUB_MESSAGE pStubMsg,
pFormat++; pFormat++;
switch_value = get_discriminant(switch_type, pMemory); switch_value = get_discriminant(switch_type, pMemory);
TRACE("got switch value 0x%x\n", switch_value); TRACE("got switch value 0x%lx\n", switch_value);
pMemory += increment; pMemory += increment;
@ -6179,7 +6179,7 @@ unsigned char * WINAPI NdrNonEncapsulatedUnionMarshall(PMIDL_STUB_MESSAGE pStub
pFormat++; pFormat++;
pFormat = ComputeConformance(pStubMsg, pMemory, pFormat, 0); pFormat = ComputeConformance(pStubMsg, pMemory, pFormat, 0);
TRACE("got switch value 0x%lx\n", pStubMsg->MaxCount); TRACE("got switch value 0x%Ix\n", pStubMsg->MaxCount);
/* Marshall discriminant */ /* Marshall discriminant */
NdrBaseTypeMarshall(pStubMsg, (unsigned char *)&pStubMsg->MaxCount, &switch_type); NdrBaseTypeMarshall(pStubMsg, (unsigned char *)&pStubMsg->MaxCount, &switch_type);
@ -6248,7 +6248,7 @@ unsigned char * WINAPI NdrNonEncapsulatedUnionUnmarshall(PMIDL_STUB_MESSAGE pSt
/* Unmarshall discriminant */ /* Unmarshall discriminant */
discriminant = unmarshall_discriminant(pStubMsg, &pFormat); discriminant = unmarshall_discriminant(pStubMsg, &pFormat);
TRACE("unmarshalled discriminant %x\n", discriminant); TRACE("unmarshalled discriminant %lx\n", discriminant);
pFormat += *(const SHORT*)pFormat; pFormat += *(const SHORT*)pFormat;
@ -6286,7 +6286,7 @@ void WINAPI NdrNonEncapsulatedUnionBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
pFormat++; pFormat++;
pFormat = ComputeConformance(pStubMsg, pMemory, pFormat, 0); pFormat = ComputeConformance(pStubMsg, pMemory, pFormat, 0);
TRACE("got switch value 0x%lx\n", pStubMsg->MaxCount); TRACE("got switch value 0x%Ix\n", pStubMsg->MaxCount);
/* Add discriminant size */ /* Add discriminant size */
NdrBaseTypeBufferSize(pStubMsg, (unsigned char *)&pStubMsg->MaxCount, &switch_type); NdrBaseTypeBufferSize(pStubMsg, (unsigned char *)&pStubMsg->MaxCount, &switch_type);
@ -6304,7 +6304,7 @@ ULONG WINAPI NdrNonEncapsulatedUnionMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
pFormat++; pFormat++;
/* Unmarshall discriminant */ /* Unmarshall discriminant */
discriminant = unmarshall_discriminant(pStubMsg, &pFormat); discriminant = unmarshall_discriminant(pStubMsg, &pFormat);
TRACE("unmarshalled discriminant 0x%x\n", discriminant); TRACE("unmarshalled discriminant 0x%lx\n", discriminant);
return union_arm_memory_size(pStubMsg, discriminant, pFormat + *(const SHORT*)pFormat); return union_arm_memory_size(pStubMsg, discriminant, pFormat + *(const SHORT*)pFormat);
} }
@ -6321,7 +6321,7 @@ void WINAPI NdrNonEncapsulatedUnionFree(PMIDL_STUB_MESSAGE pStubMsg,
pFormat++; pFormat++;
pFormat = ComputeConformance(pStubMsg, pMemory, pFormat, 0); pFormat = ComputeConformance(pStubMsg, pMemory, pFormat, 0);
TRACE("got switch value 0x%lx\n", pStubMsg->MaxCount); TRACE("got switch value 0x%Ix\n", pStubMsg->MaxCount);
union_arm_free(pStubMsg, pMemory, pStubMsg->MaxCount, pFormat + *(const SHORT*)pFormat); union_arm_free(pStubMsg, pMemory, pStubMsg->MaxCount, pFormat + *(const SHORT*)pFormat);
} }
@ -6479,7 +6479,7 @@ unsigned char *WINAPI NdrRangeUnmarshall(
} }
base_type = pRange->flags_type & 0xf; base_type = pRange->flags_type & 0xf;
TRACE("base_type = 0x%02x, low_value = %d, high_value = %d\n", TRACE("base_type = 0x%02x, low_value = %ld, high_value = %ld\n",
base_type, pRange->low_value, pRange->high_value); base_type, pRange->low_value, pRange->high_value);
#define RANGE_UNMARSHALL(mem_type, wire_type, format_spec) \ #define RANGE_UNMARSHALL(mem_type, wire_type, format_spec) \
@ -6533,12 +6533,12 @@ unsigned char *WINAPI NdrRangeUnmarshall(
break; break;
case FC_LONG: case FC_LONG:
case FC_ENUM32: case FC_ENUM32:
RANGE_UNMARSHALL(LONG, LONG, "%d"); RANGE_UNMARSHALL(LONG, LONG, "%ld");
TRACE("value: 0x%08x\n", **(ULONG **)ppMemory); TRACE("value: 0x%08lx\n", **(ULONG **)ppMemory);
break; break;
case FC_ULONG: case FC_ULONG:
RANGE_UNMARSHALL(ULONG, ULONG, "%u"); RANGE_UNMARSHALL(ULONG, ULONG, "%lu");
TRACE("value: 0x%08x\n", **(ULONG **)ppMemory); TRACE("value: 0x%08lx\n", **(ULONG **)ppMemory);
break; break;
case FC_ENUM16: case FC_ENUM16:
RANGE_UNMARSHALL(UINT, USHORT, "%u"); RANGE_UNMARSHALL(UINT, USHORT, "%u");
@ -6643,7 +6643,7 @@ static unsigned char *WINAPI NdrBaseTypeMarshall(
case FC_ENUM32: case FC_ENUM32:
align_pointer_clear(&pStubMsg->Buffer, sizeof(ULONG)); align_pointer_clear(&pStubMsg->Buffer, sizeof(ULONG));
safe_copy_to_buffer(pStubMsg, pMemory, sizeof(ULONG)); safe_copy_to_buffer(pStubMsg, pMemory, sizeof(ULONG));
TRACE("value: 0x%08x\n", *(ULONG *)pMemory); TRACE("value: 0x%08lx\n", *(ULONG *)pMemory);
break; break;
case FC_FLOAT: case FC_FLOAT:
align_pointer_clear(&pStubMsg->Buffer, sizeof(float)); align_pointer_clear(&pStubMsg->Buffer, sizeof(float));
@ -6735,7 +6735,7 @@ static unsigned char *WINAPI NdrBaseTypeUnmarshall(
case FC_ERROR_STATUS_T: case FC_ERROR_STATUS_T:
case FC_ENUM32: case FC_ENUM32:
BASE_TYPE_UNMARSHALL(ULONG); BASE_TYPE_UNMARSHALL(ULONG);
TRACE("value: 0x%08x\n", **(ULONG **)ppMemory); TRACE("value: 0x%08lx\n", **(ULONG **)ppMemory);
break; break;
case FC_FLOAT: case FC_FLOAT:
BASE_TYPE_UNMARSHALL(float); BASE_TYPE_UNMARSHALL(float);
@ -6775,7 +6775,7 @@ static unsigned char *WINAPI NdrBaseTypeUnmarshall(
*ppMemory = NdrAllocate(pStubMsg, sizeof(INT_PTR)); *ppMemory = NdrAllocate(pStubMsg, sizeof(INT_PTR));
safe_copy_from_buffer(pStubMsg, &val, sizeof(INT)); safe_copy_from_buffer(pStubMsg, &val, sizeof(INT));
**(INT_PTR **)ppMemory = val; **(INT_PTR **)ppMemory = val;
TRACE("value: 0x%08lx\n", **(INT_PTR **)ppMemory); TRACE("value: 0x%08Ix\n", **(INT_PTR **)ppMemory);
} }
break; break;
case FC_UINT3264: case FC_UINT3264:
@ -6790,7 +6790,7 @@ static unsigned char *WINAPI NdrBaseTypeUnmarshall(
*ppMemory = NdrAllocate(pStubMsg, sizeof(UINT_PTR)); *ppMemory = NdrAllocate(pStubMsg, sizeof(UINT_PTR));
safe_copy_from_buffer(pStubMsg, &val, sizeof(UINT)); safe_copy_from_buffer(pStubMsg, &val, sizeof(UINT));
**(UINT_PTR **)ppMemory = val; **(UINT_PTR **)ppMemory = val;
TRACE("value: 0x%08lx\n", **(UINT_PTR **)ppMemory); TRACE("value: 0x%08Ix\n", **(UINT_PTR **)ppMemory);
} }
break; break;
case FC_IGNORE: case FC_IGNORE:
@ -7263,7 +7263,7 @@ void WINAPI NdrCorrelationInitialize(PMIDL_STUB_MESSAGE pStubMsg, void *pMemory,
static int once; static int once;
if (!once++) if (!once++)
FIXME("(%p, %p, %d, 0x%x): semi-stub\n", pStubMsg, pMemory, CacheSize, Flags); FIXME("(%p, %p, %ld, 0x%lx): semi-stub\n", pStubMsg, pMemory, CacheSize, Flags);
if (pStubMsg->CorrDespIncrement == 0) if (pStubMsg->CorrDespIncrement == 0)
pStubMsg->CorrDespIncrement = 2; /* size of the normal (non-range) /robust payload */ pStubMsg->CorrDespIncrement = 2; /* size of the normal (non-range) /robust payload */

View file

@ -116,7 +116,7 @@ static ULONG WINAPI RpcStream_Release(LPSTREAM iface)
RpcStreamImpl *This = impl_from_IStream(iface); RpcStreamImpl *This = impl_from_IStream(iface);
ULONG ref = InterlockedDecrement( &This->RefCount ); ULONG ref = InterlockedDecrement( &This->RefCount );
if (!ref) { if (!ref) {
TRACE("size=%d\n", *This->size); TRACE("size=%ld\n", *This->size);
This->pMsg->Buffer = This->data + *This->size; This->pMsg->Buffer = This->data + *This->size;
HeapFree(GetProcessHeap(),0,This); HeapFree(GetProcessHeap(),0,This);
} }
@ -203,7 +203,7 @@ static HRESULT WINAPI RpcStream_CopyTo(IStream *iface, IStream *dest,
static HRESULT WINAPI RpcStream_Commit(IStream *iface, DWORD flags) static HRESULT WINAPI RpcStream_Commit(IStream *iface, DWORD flags)
{ {
RpcStreamImpl *This = impl_from_IStream(iface); RpcStreamImpl *This = impl_from_IStream(iface);
FIXME("(%p)->(0x%08x): stub\n", This, flags); FIXME("(%p)->(0x%08lx): stub\n", This, flags);
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -276,7 +276,7 @@ static HRESULT RpcStream_Create(PMIDL_STUB_MESSAGE pStubMsg, BOOL init, ULONG *s
This->data = pStubMsg->Buffer + sizeof(DWORD); This->data = pStubMsg->Buffer + sizeof(DWORD);
This->pos = 0; This->pos = 0;
if (init) *This->size = 0; if (init) *This->size = 0;
TRACE("init size=%d\n", *This->size); TRACE("init size=%ld\n", *This->size);
if (size) *size = *This->size; if (size) *size = *This->size;
*stream = &This->IStream_iface; *stream = &This->IStream_iface;
@ -382,7 +382,7 @@ void WINAPI NdrInterfacePointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
COM_GetMarshalSizeMax(&size, riid, (LPUNKNOWN)pMemory, COM_GetMarshalSizeMax(&size, riid, (LPUNKNOWN)pMemory,
pStubMsg->dwDestContext, pStubMsg->pvDestContext, pStubMsg->dwDestContext, pStubMsg->pvDestContext,
MSHLFLAGS_NORMAL); MSHLFLAGS_NORMAL);
TRACE("size=%d\n", size); TRACE("size=%ld\n", size);
pStubMsg->BufferLength += sizeof(DWORD) + size; pStubMsg->BufferLength += sizeof(DWORD) + size;
} }

View file

@ -184,7 +184,7 @@ static DWORD calc_arg_size(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat)
break; break;
case FC_BOGUS_ARRAY: case FC_BOGUS_ARRAY:
pFormat = ComputeConformance(pStubMsg, NULL, pFormat + 4, *(const WORD*)&pFormat[2]); pFormat = ComputeConformance(pStubMsg, NULL, pFormat + 4, *(const WORD*)&pFormat[2]);
TRACE("conformance = %ld\n", pStubMsg->MaxCount); TRACE("conformance = %Id\n", pStubMsg->MaxCount);
pFormat = ComputeVariance(pStubMsg, NULL, pFormat, pStubMsg->MaxCount); pFormat = ComputeVariance(pStubMsg, NULL, pFormat, pStubMsg->MaxCount);
size = ComplexStructSize(pStubMsg, pFormat); size = ComplexStructSize(pStubMsg, pFormat);
size *= pStubMsg->MaxCount; size *= pStubMsg->MaxCount;
@ -873,7 +873,7 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORM
TRACE("pStubDesc %p, pFormat %p, ...\n", pStubDesc, pFormat); TRACE("pStubDesc %p, pFormat %p, ...\n", pStubDesc, pFormat);
TRACE("NDR Version: 0x%x\n", pStubDesc->Version); TRACE("NDR Version: 0x%lx\n", pStubDesc->Version);
if (pProcHeader->Oi_flags & Oi_HAS_RPCFLAGS) if (pProcHeader->Oi_flags & Oi_HAS_RPCFLAGS)
{ {
@ -891,7 +891,7 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORM
TRACE("stack size: 0x%x\n", stack_size); TRACE("stack size: 0x%x\n", stack_size);
TRACE("proc num: %d\n", procedure_number); TRACE("proc num: %d\n", procedure_number);
TRACE("Oi_flags = 0x%02x\n", pProcHeader->Oi_flags); TRACE("Oi_flags = 0x%02x\n", pProcHeader->Oi_flags);
TRACE("MIDL stub version = 0x%x\n", pStubDesc->MIDLVersion); TRACE("MIDL stub version = 0x%lx\n", pStubDesc->MIDLVersion);
pHandleFormat = pFormat; pHandleFormat = pFormat;
@ -998,7 +998,7 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORM
number_of_params, Oif_flags, ext_flags, pProcHeader); number_of_params, Oif_flags, ext_flags, pProcHeader);
} }
TRACE("RetVal = 0x%lx\n", RetVal); TRACE("RetVal = 0x%Ix\n", RetVal);
return RetVal; return RetVal;
} }
@ -1344,7 +1344,7 @@ LONG WINAPI NdrStubCall2(
pFormat = pServerInfo->ProcString + pServerInfo->FmtStringOffset[pRpcMsg->ProcNum]; pFormat = pServerInfo->ProcString + pServerInfo->FmtStringOffset[pRpcMsg->ProcNum];
pProcHeader = (const NDR_PROC_HEADER *)&pFormat[0]; pProcHeader = (const NDR_PROC_HEADER *)&pFormat[0];
TRACE("NDR Version: 0x%x\n", pStubDesc->Version); TRACE("NDR Version: 0x%lx\n", pStubDesc->Version);
if (pProcHeader->Oi_flags & Oi_HAS_RPCFLAGS) if (pProcHeader->Oi_flags & Oi_HAS_RPCFLAGS)
{ {
@ -1496,7 +1496,7 @@ LONG WINAPI NdrStubCall2(
if (retval_ptr) if (retval_ptr)
{ {
TRACE("stub implementation returned 0x%lx\n", retval); TRACE("stub implementation returned 0x%Ix\n", retval);
*retval_ptr = retval; *retval_ptr = retval;
} }
else else
@ -1616,7 +1616,7 @@ static void do_ndr_async_client_call( const MIDL_STUB_DESC *pStubDesc, PFORMAT_S
/* Later NDR language versions probably won't be backwards compatible */ /* Later NDR language versions probably won't be backwards compatible */
if (pStubDesc->Version > 0x60001) if (pStubDesc->Version > 0x60001)
{ {
FIXME("Incompatible stub description version: 0x%x\n", pStubDesc->Version); FIXME("Incompatible stub description version: 0x%lx\n", pStubDesc->Version);
RpcRaiseException(RPC_X_WRONG_STUB_VERSION); RpcRaiseException(RPC_X_WRONG_STUB_VERSION);
} }
@ -1657,7 +1657,7 @@ static void do_ndr_async_client_call( const MIDL_STUB_DESC *pStubDesc, PFORMAT_S
NdrClientInitializeNew(pRpcMsg, pStubMsg, pStubDesc, procedure_number); NdrClientInitializeNew(pRpcMsg, pStubMsg, pStubDesc, procedure_number);
TRACE("Oi_flags = 0x%02x\n", pProcHeader->Oi_flags); TRACE("Oi_flags = 0x%02x\n", pProcHeader->Oi_flags);
TRACE("MIDL stub version = 0x%x\n", pStubDesc->MIDLVersion); TRACE("MIDL stub version = 0x%lx\n", pStubDesc->MIDLVersion);
/* needed for conformance of top-level objects */ /* needed for conformance of top-level objects */
pStubMsg->StackTop = I_RpcAllocate(async_call_data->stack_size); pStubMsg->StackTop = I_RpcAllocate(async_call_data->stack_size);
@ -1808,7 +1808,7 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_async_client_call( PMIDL_STUB_DESC pStubDesc,
} }
__EXCEPT_ALL __EXCEPT_ALL
{ {
FIXME("exception %x during ndr_async_client_call()\n", GetExceptionCode()); FIXME("exception %lx during ndr_async_client_call()\n", GetExceptionCode());
ret = GetExceptionCode(); ret = GetExceptionCode();
} }
__ENDTRY __ENDTRY
@ -1816,7 +1816,7 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr_async_client_call( PMIDL_STUB_DESC pStubDesc,
else else
do_ndr_async_client_call( pStubDesc, pFormat, stack_top); do_ndr_async_client_call( pStubDesc, pFormat, stack_top);
TRACE("returning %ld\n", ret); TRACE("returning %Id\n", ret);
return ret; return ret;
} }
@ -1897,7 +1897,7 @@ cleanup:
I_RpcFree(pStubMsg->StackTop); I_RpcFree(pStubMsg->StackTop);
I_RpcFree(async_call_data); I_RpcFree(async_call_data);
TRACE("-- 0x%x\n", status); TRACE("-- 0x%lx\n", status);
return status; return status;
} }
@ -1963,7 +1963,7 @@ void RPC_ENTRY NdrAsyncServerCall(PRPC_MESSAGE pRpcMsg)
pFormat = pServerInfo->ProcString + pServerInfo->FmtStringOffset[pRpcMsg->ProcNum]; pFormat = pServerInfo->ProcString + pServerInfo->FmtStringOffset[pRpcMsg->ProcNum];
pProcHeader = (const NDR_PROC_HEADER *)&pFormat[0]; pProcHeader = (const NDR_PROC_HEADER *)&pFormat[0];
TRACE("NDR Version: 0x%x\n", pStubDesc->Version); TRACE("NDR Version: 0x%lx\n", pStubDesc->Version);
async_call_data = I_RpcAllocate(sizeof(*async_call_data) + sizeof(MIDL_STUB_MESSAGE) + sizeof(RPC_MESSAGE)); async_call_data = I_RpcAllocate(sizeof(*async_call_data) + sizeof(MIDL_STUB_MESSAGE) + sizeof(RPC_MESSAGE));
if (!async_call_data) RpcRaiseException(RPC_X_NO_MEMORY); if (!async_call_data) RpcRaiseException(RPC_X_NO_MEMORY);
@ -2143,7 +2143,7 @@ RPC_STATUS NdrpCompleteAsyncServerCall(RPC_ASYNC_STATE *pAsync, void *Reply)
if (async_call_data->retval_ptr) if (async_call_data->retval_ptr)
{ {
TRACE("stub implementation returned 0x%lx\n", *(LONG_PTR *)Reply); TRACE("stub implementation returned 0x%Ix\n", *(LONG_PTR *)Reply);
*async_call_data->retval_ptr = *(LONG_PTR *)Reply; *async_call_data->retval_ptr = *(LONG_PTR *)Reply;
} }
else else
@ -2219,7 +2219,7 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr64_client_call( MIDL_STUBLESS_PROXY_INFO *info
{ {
ULONG_PTR i; ULONG_PTR i;
TRACE("info %p, proc %u, retval %p, stack_top %p, fpu_stack %p\n", TRACE("info %p, proc %lu, retval %p, stack_top %p, fpu_stack %p\n",
info, proc, retval, stack_top, fpu_stack); info, proc, retval, stack_top, fpu_stack);
for (i = 0; i < info->nCount; ++i) for (i = 0; i < info->nCount; ++i)
@ -2279,7 +2279,7 @@ LONG_PTR CDECL DECLSPEC_HIDDEN ndr64_async_client_call( MIDL_STUBLESS_PROXY_INFO
{ {
ULONG_PTR i; ULONG_PTR i;
TRACE("info %p, proc %u, retval %p, stack_top %p, fpu_stack %p\n", TRACE("info %p, proc %lu, retval %p, stack_top %p, fpu_stack %p\n",
info, proc, retval, stack_top, fpu_stack); info, proc, retval, stack_top, fpu_stack);
for (i = 0; i < info->nCount; ++i) for (i = 0; i < info->nCount; ++i)

View file

@ -1318,7 +1318,7 @@ static ULONG WINAPI typelib_proxy_Release(IRpcProxyBuffer *iface)
struct typelib_proxy *proxy = CONTAINING_RECORD(iface, struct typelib_proxy, proxy.IRpcProxyBuffer_iface); struct typelib_proxy *proxy = CONTAINING_RECORD(iface, struct typelib_proxy, proxy.IRpcProxyBuffer_iface);
ULONG refcount = InterlockedDecrement(&proxy->proxy.RefCount); ULONG refcount = InterlockedDecrement(&proxy->proxy.RefCount);
TRACE("(%p) decreasing refs to %d\n", proxy, refcount); TRACE("(%p) decreasing refs to %ld\n", proxy, refcount);
if (!refcount) if (!refcount)
{ {
@ -1455,7 +1455,7 @@ static ULONG WINAPI typelib_stub_Release(IRpcStubBuffer *iface)
struct typelib_stub *stub = CONTAINING_RECORD(iface, struct typelib_stub, stub.stub_buffer); struct typelib_stub *stub = CONTAINING_RECORD(iface, struct typelib_stub, stub.stub_buffer);
ULONG refcount = InterlockedDecrement(&stub->stub.stub_buffer.RefCount); ULONG refcount = InterlockedDecrement(&stub->stub.stub_buffer.RefCount);
TRACE("(%p) decreasing refs to %d\n", stub, refcount); TRACE("(%p) decreasing refs to %ld\n", stub, refcount);
if (!refcount) if (!refcount)
{ {
@ -1488,7 +1488,7 @@ static HRESULT typelib_stub_init(struct typelib_stub *stub, IUnknown *server,
(void **)&stub->stub.stub_buffer.pvServerObject); (void **)&stub->stub.stub_buffer.pvServerObject);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("Failed to get interface %s, hr %#x.\n", WARN("Failed to get interface %s, hr %#lx.\n",
debugstr_guid(stub->stub_vtbl.header.piid), hr); debugstr_guid(stub->stub_vtbl.header.piid), hr);
stub->stub.stub_buffer.pvServerObject = server; stub->stub.stub_buffer.pvServerObject = server;
IUnknown_AddRef(server); IUnknown_AddRef(server);

View file

@ -251,7 +251,7 @@ static RPC_STATUS RpcAssoc_BindConnection(const RpcAssoc *assoc, RpcConnection *
status = RPCRT4_ReceiveWithAuth(conn, &response_hdr, &msg, &auth_data, &auth_length); status = RPCRT4_ReceiveWithAuth(conn, &response_hdr, &msg, &auth_data, &auth_length);
if (status != RPC_S_OK) if (status != RPC_S_OK)
{ {
ERR("receive failed with error %d\n", status); ERR("receive failed with error %ld\n", status);
return status; return status;
} }

View file

@ -143,7 +143,7 @@ RPC_STATUS WINAPI RpcAsyncCompleteCall(PRPC_ASYNC_STATE pAsync, void *Reply)
*/ */
RPC_STATUS WINAPI RpcAsyncAbortCall(PRPC_ASYNC_STATE pAsync, ULONG ExceptionCode) RPC_STATUS WINAPI RpcAsyncAbortCall(PRPC_ASYNC_STATE pAsync, ULONG ExceptionCode)
{ {
FIXME("(%p, %d/0x%x): stub\n", pAsync, ExceptionCode, ExceptionCode); FIXME("(%p, %ld/0x%lx): stub\n", pAsync, ExceptionCode, ExceptionCode);
return RPC_S_INVALID_ASYNC_HANDLE; return RPC_S_INVALID_ASYNC_HANDLE;
} }

View file

@ -1390,7 +1390,7 @@ BOOL RpcQualityOfService_IsEqual(const RpcQualityOfService *qos1, const RpcQuali
if (!qos1 || !qos2) if (!qos1 || !qos2)
return FALSE; return FALSE;
TRACE("qos1 = { %d %d %d %d }, qos2 = { %d %d %d %d }\n", TRACE("qos1 = { %ld %ld %ld %ld }, qos2 = { %ld %ld %ld %ld }\n",
qos1->qos->Capabilities, qos1->qos->IdentityTracking, qos1->qos->Capabilities, qos1->qos->IdentityTracking,
qos1->qos->ImpersonationType, qos1->qos->AdditionalSecurityInfoType, qos1->qos->ImpersonationType, qos1->qos->AdditionalSecurityInfoType,
qos2->qos->Capabilities, qos2->qos->IdentityTracking, qos2->qos->Capabilities, qos2->qos->IdentityTracking,
@ -1481,7 +1481,7 @@ RpcBindingInqAuthInfoExA( RPC_BINDING_HANDLE Binding, RPC_CSTR *ServerPrincName,
RPC_STATUS status; RPC_STATUS status;
RPC_WSTR principal; RPC_WSTR principal;
TRACE("%p %p %p %p %p %p %u %p\n", Binding, ServerPrincName, AuthnLevel, TRACE("%p %p %p %p %p %p %lu %p\n", Binding, ServerPrincName, AuthnLevel,
AuthnSvc, AuthIdentity, AuthzSvc, RpcQosVersion, SecurityQOS); AuthnSvc, AuthIdentity, AuthzSvc, RpcQosVersion, SecurityQOS);
status = RpcBindingInqAuthInfoExW(Binding, ServerPrincName ? &principal : NULL, AuthnLevel, status = RpcBindingInqAuthInfoExW(Binding, ServerPrincName ? &principal : NULL, AuthnLevel,
@ -1506,7 +1506,7 @@ RpcBindingInqAuthInfoExW( RPC_BINDING_HANDLE Binding, RPC_WSTR *ServerPrincName,
{ {
RpcBinding *bind = Binding; RpcBinding *bind = Binding;
TRACE("%p %p %p %p %p %p %u %p\n", Binding, ServerPrincName, AuthnLevel, TRACE("%p %p %p %p %p %p %lu %p\n", Binding, ServerPrincName, AuthnLevel,
AuthnSvc, AuthIdentity, AuthzSvc, RpcQosVersion, SecurityQOS); AuthnSvc, AuthIdentity, AuthzSvc, RpcQosVersion, SecurityQOS);
if (!bind->AuthInfo) return RPC_S_BINDING_HAS_NO_AUTH; if (!bind->AuthInfo) return RPC_S_BINDING_HAS_NO_AUTH;
@ -1595,7 +1595,7 @@ RpcBindingInqAuthClientExA( RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *
RPC_STATUS status; RPC_STATUS status;
RPC_WSTR principal; RPC_WSTR principal;
TRACE("%p %p %p %p %p %p 0x%x\n", ClientBinding, Privs, ServerPrincName, AuthnLevel, TRACE("%p %p %p %p %p %p 0x%lx\n", ClientBinding, Privs, ServerPrincName, AuthnLevel,
AuthnSvc, AuthzSvc, Flags); AuthnSvc, AuthzSvc, Flags);
status = RpcBindingInqAuthClientExW(ClientBinding, Privs, ServerPrincName ? &principal : NULL, status = RpcBindingInqAuthClientExW(ClientBinding, Privs, ServerPrincName ? &principal : NULL,
@ -1620,7 +1620,7 @@ RpcBindingInqAuthClientExW( RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *
{ {
RpcBinding *bind; RpcBinding *bind;
TRACE("%p %p %p %p %p %p 0x%x\n", ClientBinding, Privs, ServerPrincName, AuthnLevel, TRACE("%p %p %p %p %p %p 0x%lx\n", ClientBinding, Privs, ServerPrincName, AuthnLevel,
AuthnSvc, AuthzSvc, Flags); AuthnSvc, AuthzSvc, Flags);
if (!ClientBinding) ClientBinding = I_RpcGetCurrentCallHandle(); if (!ClientBinding) ClientBinding = I_RpcGetCurrentCallHandle();
@ -1676,21 +1676,21 @@ RpcBindingSetAuthInfoExA( RPC_BINDING_HANDLE Binding, RPC_CSTR ServerPrincName,
PSecPkgInfoA packages; PSecPkgInfoA packages;
ULONG cbMaxToken; ULONG cbMaxToken;
TRACE("%p %s %u %u %p %u %p\n", Binding, debugstr_a((const char*)ServerPrincName), TRACE("%p %s %lu %lu %p %lu %p\n", Binding, debugstr_a((const char*)ServerPrincName),
AuthnLevel, AuthnSvc, AuthIdentity, AuthzSvr, SecurityQos); AuthnLevel, AuthnSvc, AuthIdentity, AuthzSvr, SecurityQos);
if (SecurityQos) if (SecurityQos)
{ {
RPC_STATUS status; RPC_STATUS status;
TRACE("SecurityQos { Version=%d, Capabilities=0x%x, IdentityTracking=%d, ImpersonationLevel=%d", TRACE("SecurityQos { Version=%ld, Capabilities=0x%lx, IdentityTracking=%ld, ImpersonationLevel=%ld",
SecurityQos->Version, SecurityQos->Capabilities, SecurityQos->IdentityTracking, SecurityQos->ImpersonationType); SecurityQos->Version, SecurityQos->Capabilities, SecurityQos->IdentityTracking, SecurityQos->ImpersonationType);
if (SecurityQos->Version >= 2) if (SecurityQos->Version >= 2)
{ {
const RPC_SECURITY_QOS_V2_A *SecurityQos2 = (const RPC_SECURITY_QOS_V2_A *)SecurityQos; const RPC_SECURITY_QOS_V2_A *SecurityQos2 = (const RPC_SECURITY_QOS_V2_A *)SecurityQos;
TRACE(", AdditionalSecurityInfoType=%d", SecurityQos2->AdditionalSecurityInfoType); TRACE(", AdditionalSecurityInfoType=%ld", SecurityQos2->AdditionalSecurityInfoType);
if (SecurityQos2->AdditionalSecurityInfoType == RPC_C_AUTHN_INFO_TYPE_HTTP) if (SecurityQos2->AdditionalSecurityInfoType == RPC_C_AUTHN_INFO_TYPE_HTTP)
TRACE(", { %p, 0x%x, %d, %d, %p(%u), %s }", TRACE(", { %p, 0x%lx, %ld, %ld, %p(%lu), %s }",
SecurityQos2->u.HttpCredentials->TransportCredentials, SecurityQos2->u.HttpCredentials->TransportCredentials,
SecurityQos2->u.HttpCredentials->Flags, SecurityQos2->u.HttpCredentials->Flags,
SecurityQos2->u.HttpCredentials->AuthenticationTarget, SecurityQos2->u.HttpCredentials->AuthenticationTarget,
@ -1726,21 +1726,21 @@ RpcBindingSetAuthInfoExA( RPC_BINDING_HANDLE Binding, RPC_CSTR ServerPrincName,
if (AuthnLevel > RPC_C_AUTHN_LEVEL_PKT_PRIVACY) if (AuthnLevel > RPC_C_AUTHN_LEVEL_PKT_PRIVACY)
{ {
FIXME("unknown AuthnLevel %u\n", AuthnLevel); FIXME("unknown AuthnLevel %lu\n", AuthnLevel);
return RPC_S_UNKNOWN_AUTHN_LEVEL; return RPC_S_UNKNOWN_AUTHN_LEVEL;
} }
/* RPC_C_AUTHN_WINNT ignores the AuthzSvr parameter */ /* RPC_C_AUTHN_WINNT ignores the AuthzSvr parameter */
if (AuthzSvr && AuthnSvc != RPC_C_AUTHN_WINNT) if (AuthzSvr && AuthnSvc != RPC_C_AUTHN_WINNT)
{ {
FIXME("unsupported AuthzSvr %u\n", AuthzSvr); FIXME("unsupported AuthzSvr %lu\n", AuthzSvr);
return RPC_S_UNKNOWN_AUTHZ_SERVICE; return RPC_S_UNKNOWN_AUTHZ_SERVICE;
} }
r = EnumerateSecurityPackagesA(&package_count, &packages); r = EnumerateSecurityPackagesA(&package_count, &packages);
if (r != SEC_E_OK) if (r != SEC_E_OK)
{ {
ERR("EnumerateSecurityPackagesA failed with error 0x%08x\n", r); ERR("EnumerateSecurityPackagesA failed with error 0x%08lx\n", r);
return RPC_S_SEC_PKG_ERROR; return RPC_S_SEC_PKG_ERROR;
} }
@ -1750,12 +1750,12 @@ RpcBindingSetAuthInfoExA( RPC_BINDING_HANDLE Binding, RPC_CSTR ServerPrincName,
if (i == package_count) if (i == package_count)
{ {
FIXME("unsupported AuthnSvc %u\n", AuthnSvc); FIXME("unsupported AuthnSvc %lu\n", AuthnSvc);
FreeContextBuffer(packages); FreeContextBuffer(packages);
return RPC_S_UNKNOWN_AUTHN_SERVICE; return RPC_S_UNKNOWN_AUTHN_SERVICE;
} }
TRACE("found package %s for service %u\n", packages[i].Name, AuthnSvc); TRACE("found package %s for service %lu\n", packages[i].Name, AuthnSvc);
r = AcquireCredentialsHandleA(NULL, packages[i].Name, SECPKG_CRED_OUTBOUND, NULL, r = AcquireCredentialsHandleA(NULL, packages[i].Name, SECPKG_CRED_OUTBOUND, NULL,
AuthIdentity, NULL, NULL, &cred, &exp); AuthIdentity, NULL, NULL, &cred, &exp);
cbMaxToken = packages[i].cbMaxToken; cbMaxToken = packages[i].cbMaxToken;
@ -1785,7 +1785,7 @@ RpcBindingSetAuthInfoExA( RPC_BINDING_HANDLE Binding, RPC_CSTR ServerPrincName,
} }
else else
{ {
ERR("AcquireCredentialsHandleA failed with error 0x%08x\n", r); ERR("AcquireCredentialsHandleA failed with error 0x%08lx\n", r);
return RPC_S_SEC_PKG_ERROR; return RPC_S_SEC_PKG_ERROR;
} }
} }
@ -1807,21 +1807,21 @@ RpcBindingSetAuthInfoExW( RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName,
PSecPkgInfoW packages; PSecPkgInfoW packages;
ULONG cbMaxToken; ULONG cbMaxToken;
TRACE("%p %s %u %u %p %u %p\n", Binding, debugstr_w(ServerPrincName), TRACE("%p %s %lu %lu %p %lu %p\n", Binding, debugstr_w(ServerPrincName),
AuthnLevel, AuthnSvc, AuthIdentity, AuthzSvr, SecurityQos); AuthnLevel, AuthnSvc, AuthIdentity, AuthzSvr, SecurityQos);
if (SecurityQos) if (SecurityQos)
{ {
RPC_STATUS status; RPC_STATUS status;
TRACE("SecurityQos { Version=%d, Capabilities=0x%x, IdentityTracking=%d, ImpersonationLevel=%d", TRACE("SecurityQos { Version=%ld, Capabilities=0x%lx, IdentityTracking=%ld, ImpersonationLevel=%ld",
SecurityQos->Version, SecurityQos->Capabilities, SecurityQos->IdentityTracking, SecurityQos->ImpersonationType); SecurityQos->Version, SecurityQos->Capabilities, SecurityQos->IdentityTracking, SecurityQos->ImpersonationType);
if (SecurityQos->Version >= 2) if (SecurityQos->Version >= 2)
{ {
const RPC_SECURITY_QOS_V2_W *SecurityQos2 = (const RPC_SECURITY_QOS_V2_W *)SecurityQos; const RPC_SECURITY_QOS_V2_W *SecurityQos2 = (const RPC_SECURITY_QOS_V2_W *)SecurityQos;
TRACE(", AdditionalSecurityInfoType=%d", SecurityQos2->AdditionalSecurityInfoType); TRACE(", AdditionalSecurityInfoType=%ld", SecurityQos2->AdditionalSecurityInfoType);
if (SecurityQos2->AdditionalSecurityInfoType == RPC_C_AUTHN_INFO_TYPE_HTTP) if (SecurityQos2->AdditionalSecurityInfoType == RPC_C_AUTHN_INFO_TYPE_HTTP)
TRACE(", { %p, 0x%x, %d, %d, %p(%u), %s }", TRACE(", { %p, 0x%lx, %ld, %ld, %p(%lu), %s }",
SecurityQos2->u.HttpCredentials->TransportCredentials, SecurityQos2->u.HttpCredentials->TransportCredentials,
SecurityQos2->u.HttpCredentials->Flags, SecurityQos2->u.HttpCredentials->Flags,
SecurityQos2->u.HttpCredentials->AuthenticationTarget, SecurityQos2->u.HttpCredentials->AuthenticationTarget,
@ -1857,21 +1857,21 @@ RpcBindingSetAuthInfoExW( RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName,
if (AuthnLevel > RPC_C_AUTHN_LEVEL_PKT_PRIVACY) if (AuthnLevel > RPC_C_AUTHN_LEVEL_PKT_PRIVACY)
{ {
FIXME("unknown AuthnLevel %u\n", AuthnLevel); FIXME("unknown AuthnLevel %lu\n", AuthnLevel);
return RPC_S_UNKNOWN_AUTHN_LEVEL; return RPC_S_UNKNOWN_AUTHN_LEVEL;
} }
/* RPC_C_AUTHN_WINNT ignores the AuthzSvr parameter */ /* RPC_C_AUTHN_WINNT ignores the AuthzSvr parameter */
if (AuthzSvr && AuthnSvc != RPC_C_AUTHN_WINNT) if (AuthzSvr && AuthnSvc != RPC_C_AUTHN_WINNT)
{ {
FIXME("unsupported AuthzSvr %u\n", AuthzSvr); FIXME("unsupported AuthzSvr %lu\n", AuthzSvr);
return RPC_S_UNKNOWN_AUTHZ_SERVICE; return RPC_S_UNKNOWN_AUTHZ_SERVICE;
} }
r = EnumerateSecurityPackagesW(&package_count, &packages); r = EnumerateSecurityPackagesW(&package_count, &packages);
if (r != SEC_E_OK) if (r != SEC_E_OK)
{ {
ERR("EnumerateSecurityPackagesW failed with error 0x%08x\n", r); ERR("EnumerateSecurityPackagesW failed with error 0x%08lx\n", r);
return RPC_S_SEC_PKG_ERROR; return RPC_S_SEC_PKG_ERROR;
} }
@ -1881,12 +1881,12 @@ RpcBindingSetAuthInfoExW( RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName,
if (i == package_count) if (i == package_count)
{ {
FIXME("unsupported AuthnSvc %u\n", AuthnSvc); FIXME("unsupported AuthnSvc %lu\n", AuthnSvc);
FreeContextBuffer(packages); FreeContextBuffer(packages);
return RPC_S_UNKNOWN_AUTHN_SERVICE; return RPC_S_UNKNOWN_AUTHN_SERVICE;
} }
TRACE("found package %s for service %u\n", debugstr_w(packages[i].Name), AuthnSvc); TRACE("found package %s for service %lu\n", debugstr_w(packages[i].Name), AuthnSvc);
r = AcquireCredentialsHandleW(NULL, packages[i].Name, SECPKG_CRED_OUTBOUND, NULL, r = AcquireCredentialsHandleW(NULL, packages[i].Name, SECPKG_CRED_OUTBOUND, NULL,
AuthIdentity, NULL, NULL, &cred, &exp); AuthIdentity, NULL, NULL, &cred, &exp);
cbMaxToken = packages[i].cbMaxToken; cbMaxToken = packages[i].cbMaxToken;
@ -1916,7 +1916,7 @@ RpcBindingSetAuthInfoExW( RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName,
} }
else else
{ {
ERR("AcquireCredentialsHandleW failed with error 0x%08x\n", r); ERR("AcquireCredentialsHandleW failed with error 0x%08lx\n", r);
return RPC_S_SEC_PKG_ERROR; return RPC_S_SEC_PKG_ERROR;
} }
} }
@ -1928,7 +1928,7 @@ RPCRTAPI RPC_STATUS RPC_ENTRY
RpcBindingSetAuthInfoA( RPC_BINDING_HANDLE Binding, RPC_CSTR ServerPrincName, ULONG AuthnLevel, RpcBindingSetAuthInfoA( RPC_BINDING_HANDLE Binding, RPC_CSTR ServerPrincName, ULONG AuthnLevel,
ULONG AuthnSvc, RPC_AUTH_IDENTITY_HANDLE AuthIdentity, ULONG AuthzSvr ) ULONG AuthnSvc, RPC_AUTH_IDENTITY_HANDLE AuthIdentity, ULONG AuthzSvr )
{ {
TRACE("%p %s %u %u %p %u\n", Binding, debugstr_a((const char*)ServerPrincName), TRACE("%p %s %lu %lu %p %lu\n", Binding, debugstr_a((const char*)ServerPrincName),
AuthnLevel, AuthnSvc, AuthIdentity, AuthzSvr); AuthnLevel, AuthnSvc, AuthIdentity, AuthzSvr);
return RpcBindingSetAuthInfoExA(Binding, ServerPrincName, AuthnLevel, AuthnSvc, AuthIdentity, AuthzSvr, NULL); return RpcBindingSetAuthInfoExA(Binding, ServerPrincName, AuthnLevel, AuthnSvc, AuthIdentity, AuthzSvr, NULL);
} }
@ -1940,7 +1940,7 @@ RPCRTAPI RPC_STATUS RPC_ENTRY
RpcBindingSetAuthInfoW( RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName, ULONG AuthnLevel, RpcBindingSetAuthInfoW( RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName, ULONG AuthnLevel,
ULONG AuthnSvc, RPC_AUTH_IDENTITY_HANDLE AuthIdentity, ULONG AuthzSvr ) ULONG AuthnSvc, RPC_AUTH_IDENTITY_HANDLE AuthIdentity, ULONG AuthzSvr )
{ {
TRACE("%p %s %u %u %p %u\n", Binding, debugstr_w(ServerPrincName), TRACE("%p %s %lu %lu %p %lu\n", Binding, debugstr_w(ServerPrincName),
AuthnLevel, AuthnSvc, AuthIdentity, AuthzSvr); AuthnLevel, AuthnSvc, AuthIdentity, AuthzSvr);
return RpcBindingSetAuthInfoExW(Binding, ServerPrincName, AuthnLevel, AuthnSvc, AuthIdentity, AuthzSvr, NULL); return RpcBindingSetAuthInfoExW(Binding, ServerPrincName, AuthnLevel, AuthnSvc, AuthIdentity, AuthzSvr, NULL);
} }
@ -1950,7 +1950,7 @@ RpcBindingSetAuthInfoW( RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName, UL
*/ */
RPC_STATUS WINAPI RpcBindingSetOption(RPC_BINDING_HANDLE BindingHandle, ULONG Option, ULONG_PTR OptionValue) RPC_STATUS WINAPI RpcBindingSetOption(RPC_BINDING_HANDLE BindingHandle, ULONG Option, ULONG_PTR OptionValue)
{ {
TRACE("(%p, %d, %ld)\n", BindingHandle, Option, OptionValue); TRACE("(%p, %ld, %Id)\n", BindingHandle, Option, OptionValue);
switch (Option) switch (Option)
{ {
@ -1969,7 +1969,7 @@ RPC_STATUS WINAPI RpcBindingSetOption(RPC_BINDING_HANDLE BindingHandle, ULONG Op
break; break;
} }
default: default:
FIXME("option %u not supported\n", Option); FIXME("option %lu not supported\n", Option);
break; break;
} }
return RPC_S_OK; return RPC_S_OK;

View file

@ -116,7 +116,7 @@ static BOOL start_rpcss(void)
} while (status.dwCurrentState == SERVICE_START_PENDING); } while (status.dwCurrentState == SERVICE_START_PENDING);
if (status.dwCurrentState != SERVICE_RUNNING) if (status.dwCurrentState != SERVICE_RUNNING)
WARN( "RpcSs failed to start %u\n", status.dwCurrentState ); WARN( "RpcSs failed to start %lu\n", status.dwCurrentState );
} }
else ERR( "failed to start RpcSs service\n" ); else ERR( "failed to start RpcSs service\n" );
@ -206,12 +206,12 @@ static RPC_STATUS epm_register( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *Bindin
TRACE(" ifid=%s\n", debugstr_guid(&If->InterfaceId.SyntaxGUID)); TRACE(" ifid=%s\n", debugstr_guid(&If->InterfaceId.SyntaxGUID));
for (i=0; i<BindingVector->Count; i++) { for (i=0; i<BindingVector->Count; i++) {
RpcBinding* bind = BindingVector->BindingH[i]; RpcBinding* bind = BindingVector->BindingH[i];
TRACE(" protseq[%d]=%s\n", i, debugstr_a(bind->Protseq)); TRACE(" protseq[%ld]=%s\n", i, debugstr_a(bind->Protseq));
TRACE(" endpoint[%d]=%s\n", i, debugstr_a(bind->Endpoint)); TRACE(" endpoint[%ld]=%s\n", i, debugstr_a(bind->Endpoint));
} }
if (UuidVector) { if (UuidVector) {
for (i=0; i<UuidVector->Count; i++) for (i=0; i<UuidVector->Count; i++)
TRACE(" obj[%d]=%s\n", i, debugstr_guid(UuidVector->Uuid[i])); TRACE(" obj[%ld]=%s\n", i, debugstr_guid(UuidVector->Uuid[i]));
} }
if (!BindingVector->Count) return RPC_S_OK; if (!BindingVector->Count) return RPC_S_OK;
@ -270,7 +270,7 @@ static RPC_STATUS epm_register( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *Bindin
continue; continue;
} }
if (status2 != RPC_S_OK) if (status2 != RPC_S_OK)
ERR("ept_insert failed with error %d\n", status2); ERR("ept_insert failed with error %ld\n", status2);
status = status2; /* FIXME: convert status? */ status = status2; /* FIXME: convert status? */
break; break;
} }
@ -354,12 +354,12 @@ RPC_STATUS WINAPI RpcEpUnregister( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *Bin
TRACE(" ifid=%s\n", debugstr_guid(&If->InterfaceId.SyntaxGUID)); TRACE(" ifid=%s\n", debugstr_guid(&If->InterfaceId.SyntaxGUID));
for (i=0; i<BindingVector->Count; i++) { for (i=0; i<BindingVector->Count; i++) {
RpcBinding* bind = BindingVector->BindingH[i]; RpcBinding* bind = BindingVector->BindingH[i];
TRACE(" protseq[%d]=%s\n", i, debugstr_a(bind->Protseq)); TRACE(" protseq[%ld]=%s\n", i, debugstr_a(bind->Protseq));
TRACE(" endpoint[%d]=%s\n", i, debugstr_a(bind->Endpoint)); TRACE(" endpoint[%ld]=%s\n", i, debugstr_a(bind->Endpoint));
} }
if (UuidVector) { if (UuidVector) {
for (i=0; i<UuidVector->Count; i++) for (i=0; i<UuidVector->Count; i++)
TRACE(" obj[%d]=%s\n", i, debugstr_guid(UuidVector->Uuid[i])); TRACE(" obj[%ld]=%s\n", i, debugstr_guid(UuidVector->Uuid[i]));
} }
entries = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*entries) * BindingVector->Count * (UuidVector ? UuidVector->Count : 1)); entries = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*entries) * BindingVector->Count * (UuidVector ? UuidVector->Count : 1));
@ -407,7 +407,7 @@ RPC_STATUS WINAPI RpcEpUnregister( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *Bin
if (status2 == RPC_S_SERVER_UNAVAILABLE) if (status2 == RPC_S_SERVER_UNAVAILABLE)
status2 = EPT_S_NOT_REGISTERED; status2 = EPT_S_NOT_REGISTERED;
if (status2 != RPC_S_OK) if (status2 != RPC_S_OK)
ERR("ept_insert failed with error %d\n", status2); ERR("ept_insert failed with error %ld\n", status2);
status = status2; /* FIXME: convert status? */ status = status2; /* FIXME: convert status? */
} }
RpcBindingFree(&handle); RpcBindingFree(&handle);
@ -501,7 +501,7 @@ RPC_STATUS WINAPI RpcEpResolveBinding( RPC_BINDING_HANDLE Binding, RPC_IF_HANDLE
if (!resolved_endpoint) if (!resolved_endpoint)
{ {
status = TowerExplode(towers[i], NULL, NULL, NULL, &resolved_endpoint, NULL); status = TowerExplode(towers[i], NULL, NULL, NULL, &resolved_endpoint, NULL);
TRACE("status = %d\n", status); TRACE("status = %ld\n", status);
} }
I_RpcFree(towers[i]); I_RpcFree(towers[i]);
} }

View file

@ -524,7 +524,7 @@ BOOL RPCRT4_IsValidHttpPacket(RpcPktHdr *hdr, unsigned char *data,
data_len -= 24; data_len -= 24;
break; break;
default: default:
FIXME("unimplemented type 0x%x\n", type); FIXME("unimplemented type 0x%lx\n", type);
break; break;
} }
} }
@ -554,7 +554,7 @@ static unsigned char *RPCRT4_NextHttpHeaderField(unsigned char *data)
case 0x1: case 0x1:
return data + 24; return data + 24;
default: default:
FIXME("unimplemented type 0x%x\n", type); FIXME("unimplemented type 0x%lx\n", type);
return data; return data;
} }
} }
@ -580,7 +580,7 @@ RPC_STATUS RPCRT4_ParseHttpPrepareHeader1(RpcPktHdr *header,
type = READ_HTTP_PAYLOAD_FIELD_TYPE(data); type = READ_HTTP_PAYLOAD_FIELD_TYPE(data);
if (type != 0x00000002) if (type != 0x00000002)
{ {
ERR("invalid type 0x%08x\n", type); ERR("invalid type 0x%08lx\n", type);
return RPC_S_PROTOCOL_ERROR; return RPC_S_PROTOCOL_ERROR;
} }
*field1 = *(ULONG *)GET_HTTP_PAYLOAD_FIELD_DATA(data); *field1 = *(ULONG *)GET_HTTP_PAYLOAD_FIELD_DATA(data);
@ -608,7 +608,7 @@ RPC_STATUS RPCRT4_ParseHttpPrepareHeader2(RpcPktHdr *header,
type = READ_HTTP_PAYLOAD_FIELD_TYPE(data); type = READ_HTTP_PAYLOAD_FIELD_TYPE(data);
if (type != 0x00000006) if (type != 0x00000006)
{ {
ERR("invalid type for field 1: 0x%08x\n", type); ERR("invalid type for field 1: 0x%08lx\n", type);
return RPC_S_PROTOCOL_ERROR; return RPC_S_PROTOCOL_ERROR;
} }
*field1 = *(ULONG *)GET_HTTP_PAYLOAD_FIELD_DATA(data); *field1 = *(ULONG *)GET_HTTP_PAYLOAD_FIELD_DATA(data);
@ -617,7 +617,7 @@ RPC_STATUS RPCRT4_ParseHttpPrepareHeader2(RpcPktHdr *header,
type = READ_HTTP_PAYLOAD_FIELD_TYPE(data); type = READ_HTTP_PAYLOAD_FIELD_TYPE(data);
if (type != 0x00000000) if (type != 0x00000000)
{ {
ERR("invalid type for field 2: 0x%08x\n", type); ERR("invalid type for field 2: 0x%08lx\n", type);
return RPC_S_PROTOCOL_ERROR; return RPC_S_PROTOCOL_ERROR;
} }
*bytes_until_next_packet = *(ULONG *)GET_HTTP_PAYLOAD_FIELD_DATA(data); *bytes_until_next_packet = *(ULONG *)GET_HTTP_PAYLOAD_FIELD_DATA(data);
@ -626,7 +626,7 @@ RPC_STATUS RPCRT4_ParseHttpPrepareHeader2(RpcPktHdr *header,
type = READ_HTTP_PAYLOAD_FIELD_TYPE(data); type = READ_HTTP_PAYLOAD_FIELD_TYPE(data);
if (type != 0x00000002) if (type != 0x00000002)
{ {
ERR("invalid type for field 3: 0x%08x\n", type); ERR("invalid type for field 3: 0x%08lx\n", type);
return RPC_S_PROTOCOL_ERROR; return RPC_S_PROTOCOL_ERROR;
} }
*field3 = *(ULONG *)GET_HTTP_PAYLOAD_FIELD_DATA(data); *field3 = *(ULONG *)GET_HTTP_PAYLOAD_FIELD_DATA(data);
@ -655,12 +655,12 @@ RPC_STATUS RPCRT4_ParseHttpFlowControlHeader(RpcPktHdr *header,
type = READ_HTTP_PAYLOAD_FIELD_TYPE(data); type = READ_HTTP_PAYLOAD_FIELD_TYPE(data);
if (type != 0x0000000d) if (type != 0x0000000d)
{ {
ERR("invalid type for field 1: 0x%08x\n", type); ERR("invalid type for field 1: 0x%08lx\n", type);
return RPC_S_PROTOCOL_ERROR; return RPC_S_PROTOCOL_ERROR;
} }
if (*(ULONG *)GET_HTTP_PAYLOAD_FIELD_DATA(data) != (server ? 0x3 : 0x0)) if (*(ULONG *)GET_HTTP_PAYLOAD_FIELD_DATA(data) != (server ? 0x3 : 0x0))
{ {
ERR("invalid type for 0xd field data: 0x%08x\n", *(ULONG *)GET_HTTP_PAYLOAD_FIELD_DATA(data)); ERR("invalid type for 0xd field data: 0x%08lx\n", *(ULONG *)GET_HTTP_PAYLOAD_FIELD_DATA(data));
return RPC_S_PROTOCOL_ERROR; return RPC_S_PROTOCOL_ERROR;
} }
data = RPCRT4_NextHttpHeaderField(data); data = RPCRT4_NextHttpHeaderField(data);
@ -668,7 +668,7 @@ RPC_STATUS RPCRT4_ParseHttpFlowControlHeader(RpcPktHdr *header,
type = READ_HTTP_PAYLOAD_FIELD_TYPE(data); type = READ_HTTP_PAYLOAD_FIELD_TYPE(data);
if (type != 0x00000001) if (type != 0x00000001)
{ {
ERR("invalid type for field 2: 0x%08x\n", type); ERR("invalid type for field 2: 0x%08lx\n", type);
return RPC_S_PROTOCOL_ERROR; return RPC_S_PROTOCOL_ERROR;
} }
*bytes_transmitted = *(ULONG *)GET_HTTP_PAYLOAD_FIELD_DATA(data); *bytes_transmitted = *(ULONG *)GET_HTTP_PAYLOAD_FIELD_DATA(data);
@ -714,7 +714,7 @@ RPC_STATUS RPCRT4_default_secure_packet(RpcConnection *Connection,
sec_status = EncryptMessage(&Connection->ctx, 0, &message, 0 /* FIXME */); sec_status = EncryptMessage(&Connection->ctx, 0, &message, 0 /* FIXME */);
if (sec_status != SEC_E_OK) if (sec_status != SEC_E_OK)
{ {
ERR("EncryptMessage failed with 0x%08x\n", sec_status); ERR("EncryptMessage failed with 0x%08lx\n", sec_status);
return RPC_S_SEC_PKG_ERROR; return RPC_S_SEC_PKG_ERROR;
} }
} }
@ -723,7 +723,7 @@ RPC_STATUS RPCRT4_default_secure_packet(RpcConnection *Connection,
sec_status = MakeSignature(&Connection->ctx, 0, &message, 0 /* FIXME */); sec_status = MakeSignature(&Connection->ctx, 0, &message, 0 /* FIXME */);
if (sec_status != SEC_E_OK) if (sec_status != SEC_E_OK)
{ {
ERR("MakeSignature failed with 0x%08x\n", sec_status); ERR("MakeSignature failed with 0x%08lx\n", sec_status);
return RPC_S_SEC_PKG_ERROR; return RPC_S_SEC_PKG_ERROR;
} }
} }
@ -735,7 +735,7 @@ RPC_STATUS RPCRT4_default_secure_packet(RpcConnection *Connection,
sec_status = DecryptMessage(&Connection->ctx, &message, 0 /* FIXME */, 0); sec_status = DecryptMessage(&Connection->ctx, &message, 0 /* FIXME */, 0);
if (sec_status != SEC_E_OK) if (sec_status != SEC_E_OK)
{ {
ERR("DecryptMessage failed with 0x%08x\n", sec_status); ERR("DecryptMessage failed with 0x%08lx\n", sec_status);
return RPC_S_SEC_PKG_ERROR; return RPC_S_SEC_PKG_ERROR;
} }
} }
@ -744,7 +744,7 @@ RPC_STATUS RPCRT4_default_secure_packet(RpcConnection *Connection,
sec_status = VerifySignature(&Connection->ctx, &message, 0 /* FIXME */, NULL); sec_status = VerifySignature(&Connection->ctx, &message, 0 /* FIXME */, NULL);
if (sec_status != SEC_E_OK) if (sec_status != SEC_E_OK)
{ {
ERR("VerifySignature failed with 0x%08x\n", sec_status); ERR("VerifySignature failed with 0x%08lx\n", sec_status);
return RPC_S_SEC_PKG_ERROR; return RPC_S_SEC_PKG_ERROR;
} }
} }
@ -945,11 +945,11 @@ RPC_STATUS RPCRT4_default_authorize(RpcConnection *conn, BOOL first_time,
} }
if (FAILED(r)) if (FAILED(r))
{ {
WARN("InitializeSecurityContext failed with error 0x%08x\n", r); WARN("InitializeSecurityContext failed with error 0x%08lx\n", r);
goto failed; goto failed;
} }
TRACE("r = 0x%08x, attr = 0x%08x\n", r, conn->attr); TRACE("r = 0x%08lx, attr = 0x%08lx\n", r, conn->attr);
continue_needed = ((r == SEC_I_CONTINUE_NEEDED) || continue_needed = ((r == SEC_I_CONTINUE_NEEDED) ||
(r == SEC_I_COMPLETE_AND_CONTINUE)); (r == SEC_I_COMPLETE_AND_CONTINUE));
@ -959,19 +959,19 @@ RPC_STATUS RPCRT4_default_authorize(RpcConnection *conn, BOOL first_time,
r = CompleteAuthToken(&conn->ctx, &out_desc); r = CompleteAuthToken(&conn->ctx, &out_desc);
if (FAILED(r)) if (FAILED(r))
{ {
WARN("CompleteAuthToken failed with error 0x%08x\n", r); WARN("CompleteAuthToken failed with error 0x%08lx\n", r);
goto failed; goto failed;
} }
} }
TRACE("cbBuffer = %d\n", out.cbBuffer); TRACE("cbBuffer = %ld\n", out.cbBuffer);
if (!continue_needed) if (!continue_needed)
{ {
r = QueryContextAttributesA(&conn->ctx, SECPKG_ATTR_SIZES, &secctx_sizes); r = QueryContextAttributesA(&conn->ctx, SECPKG_ATTR_SIZES, &secctx_sizes);
if (FAILED(r)) if (FAILED(r))
{ {
WARN("QueryContextAttributes failed with error 0x%08x\n", r); WARN("QueryContextAttributes failed with error 0x%08lx\n", r);
goto failed; goto failed;
} }
conn->signature_auth_len = secctx_sizes.cbMaxSignature; conn->signature_auth_len = secctx_sizes.cbMaxSignature;
@ -997,7 +997,7 @@ RPC_STATUS RPCRT4_ClientConnectionAuth(RpcConnection* conn, BYTE *challenge,
unsigned char *out_buffer; unsigned char *out_buffer;
unsigned int out_len = 0; unsigned int out_len = 0;
TRACE("challenge %s, %d bytes\n", challenge, count); TRACE("challenge %s, %ld bytes\n", challenge, count);
status = rpcrt4_conn_authorize(conn, FALSE, challenge, count, NULL, &out_len); status = rpcrt4_conn_authorize(conn, FALSE, challenge, count, NULL, &out_len);
if (status) return status; if (status) return status;
@ -1138,7 +1138,7 @@ RPC_STATUS RPCRT4_default_impersonate_client(RpcConnection *conn)
return RPC_S_NO_CONTEXT_AVAILABLE; return RPC_S_NO_CONTEXT_AVAILABLE;
sec_status = ImpersonateSecurityContext(&conn->ctx); sec_status = ImpersonateSecurityContext(&conn->ctx);
if (sec_status != SEC_E_OK) if (sec_status != SEC_E_OK)
WARN("ImpersonateSecurityContext returned 0x%08x\n", sec_status); WARN("ImpersonateSecurityContext returned 0x%08lx\n", sec_status);
switch (sec_status) switch (sec_status)
{ {
case SEC_E_UNSUPPORTED_FUNCTION: case SEC_E_UNSUPPORTED_FUNCTION:
@ -1166,7 +1166,7 @@ RPC_STATUS RPCRT4_default_revert_to_self(RpcConnection *conn)
return RPC_S_NO_CONTEXT_AVAILABLE; return RPC_S_NO_CONTEXT_AVAILABLE;
sec_status = RevertSecurityContext(&conn->ctx); sec_status = RevertSecurityContext(&conn->ctx);
if (sec_status != SEC_E_OK) if (sec_status != SEC_E_OK)
WARN("RevertSecurityContext returned 0x%08x\n", sec_status); WARN("RevertSecurityContext returned 0x%08lx\n", sec_status);
switch (sec_status) switch (sec_status)
{ {
case SEC_E_UNSUPPORTED_FUNCTION: case SEC_E_UNSUPPORTED_FUNCTION:
@ -1210,7 +1210,7 @@ RPC_STATUS RPCRT4_default_inquire_auth_client(
*authz_svc = RPC_C_AUTHZ_NONE; *authz_svc = RPC_C_AUTHZ_NONE;
} }
if (flags) if (flags)
FIXME("flags 0x%x not implemented\n", flags); FIXME("flags 0x%lx not implemented\n", flags);
return RPC_S_OK; return RPC_S_OK;
} }
@ -1300,7 +1300,7 @@ static RPC_STATUS RPCRT4_default_receive_fragment(RpcConnection *Connection, Rpc
/* read packet common header */ /* read packet common header */
dwRead = rpcrt4_conn_read(Connection, &common_hdr, sizeof(common_hdr)); dwRead = rpcrt4_conn_read(Connection, &common_hdr, sizeof(common_hdr));
if (dwRead != sizeof(common_hdr)) { if (dwRead != sizeof(common_hdr)) {
WARN("Short read of header, %d bytes\n", dwRead); WARN("Short read of header, %ld bytes\n", dwRead);
status = RPC_S_CALL_FAILED; status = RPC_S_CALL_FAILED;
goto fail; goto fail;
} }
@ -1321,7 +1321,7 @@ static RPC_STATUS RPCRT4_default_receive_fragment(RpcConnection *Connection, Rpc
/* read the rest of packet header */ /* read the rest of packet header */
dwRead = rpcrt4_conn_read(Connection, &(*Header)->common + 1, hdr_length - sizeof(common_hdr)); dwRead = rpcrt4_conn_read(Connection, &(*Header)->common + 1, hdr_length - sizeof(common_hdr));
if (dwRead != hdr_length - sizeof(common_hdr)) { if (dwRead != hdr_length - sizeof(common_hdr)) {
WARN("bad header length, %d bytes, hdr_length %d\n", dwRead, hdr_length); WARN("bad header length, %ld bytes, hdr_length %ld\n", dwRead, hdr_length);
status = RPC_S_CALL_FAILED; status = RPC_S_CALL_FAILED;
goto fail; goto fail;
} }
@ -1338,7 +1338,7 @@ static RPC_STATUS RPCRT4_default_receive_fragment(RpcConnection *Connection, Rpc
dwRead = rpcrt4_conn_read(Connection, *Payload, common_hdr.frag_len - hdr_length); dwRead = rpcrt4_conn_read(Connection, *Payload, common_hdr.frag_len - hdr_length);
if (dwRead != common_hdr.frag_len - hdr_length) if (dwRead != common_hdr.frag_len - hdr_length)
{ {
WARN("bad data length, %d/%d\n", dwRead, common_hdr.frag_len - hdr_length); WARN("bad data length, %ld/%ld\n", dwRead, common_hdr.frag_len - hdr_length);
status = RPC_S_CALL_FAILED; status = RPC_S_CALL_FAILED;
goto fail; goto fail;
} }
@ -1442,14 +1442,14 @@ RPC_STATUS RPCRT4_ReceiveWithAuth(RpcConnection *Connection, RpcPktHdr **Header,
if ((CurrentHeader->common.frag_len < hdr_length) || if ((CurrentHeader->common.frag_len < hdr_length) ||
(CurrentHeader->common.frag_len - hdr_length < header_auth_len)) { (CurrentHeader->common.frag_len - hdr_length < header_auth_len)) {
WARN("frag_len %d too small for hdr_length %d and auth_len %d\n", WARN("frag_len %d too small for hdr_length %ld and auth_len %d\n",
CurrentHeader->common.frag_len, hdr_length, CurrentHeader->common.auth_len); CurrentHeader->common.frag_len, hdr_length, CurrentHeader->common.auth_len);
status = RPC_S_PROTOCOL_ERROR; status = RPC_S_PROTOCOL_ERROR;
goto fail; goto fail;
} }
if (CurrentHeader->common.auth_len != auth_length) { if (CurrentHeader->common.auth_len != auth_length) {
WARN("auth_len header field changed from %d to %d\n", WARN("auth_len header field changed from %ld to %d\n",
auth_length, CurrentHeader->common.auth_len); auth_length, CurrentHeader->common.auth_len);
status = RPC_S_PROTOCOL_ERROR; status = RPC_S_PROTOCOL_ERROR;
goto fail; goto fail;
@ -1463,7 +1463,7 @@ RPC_STATUS RPCRT4_ReceiveWithAuth(RpcConnection *Connection, RpcPktHdr **Header,
data_length = CurrentHeader->common.frag_len - hdr_length - header_auth_len; data_length = CurrentHeader->common.frag_len - hdr_length - header_auth_len;
if (data_length + buffer_length > pMsg->BufferLength) { if (data_length + buffer_length > pMsg->BufferLength) {
TRACE("allocation hint exceeded, new buffer length = %d\n", TRACE("allocation hint exceeded, new buffer length = %ld\n",
data_length + buffer_length); data_length + buffer_length);
pMsg->BufferLength = data_length + buffer_length; pMsg->BufferLength = data_length + buffer_length;
status = I_RpcReAllocateBuffer(pMsg); status = I_RpcReAllocateBuffer(pMsg);
@ -1741,7 +1741,7 @@ static DWORD WINAPI async_notifier_proc(LPVOID p)
QueueUserAPC(async_apc_notifier_proc, state->u.APC.hThread, (ULONG_PTR)state); QueueUserAPC(async_apc_notifier_proc, state->u.APC.hThread, (ULONG_PTR)state);
break; break;
case RpcNotificationTypeIoc: case RpcNotificationTypeIoc:
TRACE("RpcNotificationTypeIoc %p, 0x%x, 0x%lx, %p\n", TRACE("RpcNotificationTypeIoc %p, 0x%lx, 0x%Ix, %p\n",
state->u.IOC.hIOPort, state->u.IOC.dwNumberOfBytesTransferred, state->u.IOC.hIOPort, state->u.IOC.dwNumberOfBytesTransferred,
state->u.IOC.dwCompletionKey, state->u.IOC.lpOverlapped); state->u.IOC.dwCompletionKey, state->u.IOC.lpOverlapped);
PostQueuedCompletionStatus(state->u.IOC.hIOPort, PostQueuedCompletionStatus(state->u.IOC.hIOPort,
@ -1867,7 +1867,7 @@ RPC_STATUS WINAPI I_RpcReceive(PRPC_MESSAGE pMsg)
conn = pMsg->ReservedForRuntime; conn = pMsg->ReservedForRuntime;
status = RPCRT4_Receive(conn, &hdr, pMsg); status = RPCRT4_Receive(conn, &hdr, pMsg);
if (status != RPC_S_OK) { if (status != RPC_S_OK) {
WARN("receive failed with error %x\n", status); WARN("receive failed with error %lx\n", status);
goto fail; goto fail;
} }
@ -1976,6 +1976,6 @@ RPC_STATUS WINAPI I_RpcAsyncSetHandle(PRPC_MESSAGE pMsg, PRPC_ASYNC_STATE pAsync
*/ */
RPC_STATUS WINAPI I_RpcAsyncAbortCall(PRPC_ASYNC_STATE pAsync, ULONG ExceptionCode) RPC_STATUS WINAPI I_RpcAsyncAbortCall(PRPC_ASYNC_STATE pAsync, ULONG ExceptionCode)
{ {
FIXME("(%p, %d): stub\n", pAsync, ExceptionCode); FIXME("(%p, %ld): stub\n", pAsync, ExceptionCode);
return RPC_S_INVALID_ASYNC_HANDLE; return RPC_S_INVALID_ASYNC_HANDLE;
} }

View file

@ -190,7 +190,7 @@ static RpcPktHdr *handle_bind_error(RpcConnection *conn, RPC_STATUS error)
reject_reason = REJECT_INVALID_CHECKSUM; reject_reason = REJECT_INVALID_CHECKSUM;
break; break;
default: default:
FIXME("unexpected status value %d\n", error); FIXME("unexpected status value %ld\n", error);
/* fall through */ /* fall through */
case RPC_S_INVALID_BOUND: case RPC_S_INVALID_BOUND:
reject_reason = REJECT_REASON_NOT_SPECIFIED; reject_reason = REJECT_REASON_NOT_SPECIFIED;
@ -435,7 +435,7 @@ static RPC_STATUS process_request_packet(RpcConnection *conn, RpcPktRequestHdr *
__TRY { __TRY {
if (func) func(msg); if (func) func(msg);
} __EXCEPT_ALL { } __EXCEPT_ALL {
WARN("exception caught with code 0x%08x = %d\n", GetExceptionCode(), GetExceptionCode()); WARN("exception caught with code 0x%08lx = %ld\n", GetExceptionCode(), GetExceptionCode());
exception = TRUE; exception = TRUE;
if (GetExceptionCode() == STATUS_ACCESS_VIOLATION) if (GetExceptionCode() == STATUS_ACCESS_VIOLATION)
status = ERROR_NOACCESS; status = ERROR_NOACCESS;
@ -558,7 +558,7 @@ static DWORD CALLBACK RPCRT4_io_thread(LPVOID the_arg)
status = RPCRT4_ReceiveWithAuth(conn, &hdr, msg, &auth_data, &auth_length); status = RPCRT4_ReceiveWithAuth(conn, &hdr, msg, &auth_data, &auth_length);
if (status != RPC_S_OK) { if (status != RPC_S_OK) {
WARN("receive failed with error %x\n", status); WARN("receive failed with error %lx\n", status);
HeapFree(GetProcessHeap(), 0, msg); HeapFree(GetProcessHeap(), 0, msg);
break; break;
} }
@ -588,7 +588,7 @@ static DWORD CALLBACK RPCRT4_io_thread(LPVOID the_arg)
packet->auth_data = auth_data; packet->auth_data = auth_data;
packet->auth_length = auth_length; packet->auth_length = auth_length;
if (!QueueUserWorkItem(RPCRT4_worker_thread, packet, WT_EXECUTELONGFUNCTION)) { if (!QueueUserWorkItem(RPCRT4_worker_thread, packet, WT_EXECUTELONGFUNCTION)) {
ERR("couldn't queue work item for worker thread, error was %d\n", GetLastError()); ERR("couldn't queue work item for worker thread, error was %ld\n", GetLastError());
HeapFree(GetProcessHeap(), 0, packet); HeapFree(GetProcessHeap(), 0, packet);
status = RPC_S_OUT_OF_RESOURCES; status = RPC_S_OUT_OF_RESOURCES;
} else { } else {
@ -613,7 +613,7 @@ static DWORD CALLBACK RPCRT4_io_thread(LPVOID the_arg)
HeapFree(GetProcessHeap(), 0, auth_data); HeapFree(GetProcessHeap(), 0, auth_data);
if (status != RPC_S_OK) { if (status != RPC_S_OK) {
WARN("processing packet failed with error %u\n", status); WARN("processing packet failed with error %lu\n", status);
break; break;
} }
} }
@ -627,7 +627,7 @@ void RPCRT4_new_client(RpcConnection* conn)
HANDLE thread = CreateThread(NULL, 0, RPCRT4_io_thread, conn, 0, NULL); HANDLE thread = CreateThread(NULL, 0, RPCRT4_io_thread, conn, 0, NULL);
if (!thread) { if (!thread) {
DWORD err = GetLastError(); DWORD err = GetLastError();
ERR("failed to create thread, error=%08x\n", err); ERR("failed to create thread, error=%08lx\n", err);
RPCRT4_ReleaseConnection(conn); RPCRT4_ReleaseConnection(conn);
} }
/* we could set conn->thread, but then we'd have to make the io_thread wait /* we could set conn->thread, but then we'd have to make the io_thread wait
@ -1020,7 +1020,7 @@ RPC_STATUS WINAPI RpcServerUseProtseqEpExA( RPC_CSTR Protseq, UINT MaxCalls, RPC
RpcServerProtseq* ps; RpcServerProtseq* ps;
RPC_STATUS status; RPC_STATUS status;
TRACE("(%s,%u,%s,%p,{%u,%u,%u})\n", debugstr_a((const char *)Protseq), TRACE("(%s,%u,%s,%p,{%u,%lu,%lu})\n", debugstr_a((const char *)Protseq),
MaxCalls, debugstr_a((const char *)Endpoint), SecurityDescriptor, MaxCalls, debugstr_a((const char *)Endpoint), SecurityDescriptor,
lpPolicy->Length, lpPolicy->EndpointFlags, lpPolicy->NICFlags ); lpPolicy->Length, lpPolicy->EndpointFlags, lpPolicy->NICFlags );
@ -1042,7 +1042,7 @@ RPC_STATUS WINAPI RpcServerUseProtseqEpExW( RPC_WSTR Protseq, UINT MaxCalls, RPC
LPSTR ProtseqA; LPSTR ProtseqA;
LPSTR EndpointA; LPSTR EndpointA;
TRACE("(%s,%u,%s,%p,{%u,%u,%u})\n", debugstr_w( Protseq ), MaxCalls, TRACE("(%s,%u,%s,%p,{%u,%lu,%lu})\n", debugstr_w( Protseq ), MaxCalls,
debugstr_w( Endpoint ), SecurityDescriptor, debugstr_w( Endpoint ), SecurityDescriptor,
lpPolicy->Length, lpPolicy->EndpointFlags, lpPolicy->NICFlags ); lpPolicy->Length, lpPolicy->EndpointFlags, lpPolicy->NICFlags );
@ -1170,7 +1170,7 @@ RPC_STATUS WINAPI RpcServerRegisterIf3( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid,
for (i=0; i<If->DispatchTable->DispatchTableCount; i++) { for (i=0; i<If->DispatchTable->DispatchTableCount; i++) {
TRACE(" entry %d: %p\n", i, If->DispatchTable->DispatchTable[i]); TRACE(" entry %d: %p\n", i, If->DispatchTable->DispatchTable[i]);
} }
TRACE(" reserved: %ld\n", If->DispatchTable->Reserved); TRACE(" reserved: %Id\n", If->DispatchTable->Reserved);
} }
TRACE(" protseq endpoint count: %d\n", If->RpcProtseqEndpointCount); TRACE(" protseq endpoint count: %d\n", If->RpcProtseqEndpointCount);
TRACE(" default manager epv: %p\n", If->DefaultManagerEpv); TRACE(" default manager epv: %p\n", If->DefaultManagerEpv);
@ -1345,7 +1345,7 @@ static RPC_STATUS find_security_package(ULONG auth_type, SecPkgInfoW **packages_
sec_status = EnumerateSecurityPackagesW(&package_count, &packages); sec_status = EnumerateSecurityPackagesW(&package_count, &packages);
if (sec_status != SEC_E_OK) if (sec_status != SEC_E_OK)
{ {
ERR("EnumerateSecurityPackagesW failed with error 0x%08x\n", sec_status); ERR("EnumerateSecurityPackagesW failed with error 0x%08lx\n", sec_status);
return RPC_S_SEC_PKG_ERROR; return RPC_S_SEC_PKG_ERROR;
} }
@ -1355,12 +1355,12 @@ static RPC_STATUS find_security_package(ULONG auth_type, SecPkgInfoW **packages_
if (i == package_count) if (i == package_count)
{ {
WARN("unsupported AuthnSvc %u\n", auth_type); WARN("unsupported AuthnSvc %lu\n", auth_type);
FreeContextBuffer(packages); FreeContextBuffer(packages);
return RPC_S_UNKNOWN_AUTHN_SERVICE; return RPC_S_UNKNOWN_AUTHN_SERVICE;
} }
TRACE("found package %s for service %u\n", debugstr_w(packages[i].Name), auth_type); TRACE("found package %s for service %lu\n", debugstr_w(packages[i].Name), auth_type);
*packages_buf = packages; *packages_buf = packages;
*ret = packages + i; *ret = packages + i;
return RPC_S_OK; return RPC_S_OK;
@ -1421,7 +1421,7 @@ RPC_STATUS WINAPI RpcServerRegisterAuthInfoA( RPC_CSTR ServerPrincName, ULONG Au
WCHAR *principal_name = NULL; WCHAR *principal_name = NULL;
RPC_STATUS status; RPC_STATUS status;
TRACE("(%s,%u,%p,%p)\n", ServerPrincName, AuthnSvc, GetKeyFn, Arg); TRACE("(%s,%lu,%p,%p)\n", ServerPrincName, AuthnSvc, GetKeyFn, Arg);
if(ServerPrincName && !(principal_name = RPCRT4_strdupAtoW((const char*)ServerPrincName))) if(ServerPrincName && !(principal_name = RPCRT4_strdupAtoW((const char*)ServerPrincName)))
return RPC_S_OUT_OF_RESOURCES; return RPC_S_OUT_OF_RESOURCES;
@ -1444,7 +1444,7 @@ RPC_STATUS WINAPI RpcServerRegisterAuthInfoW( RPC_WSTR ServerPrincName, ULONG Au
ULONG max_token; ULONG max_token;
RPC_STATUS status; RPC_STATUS status;
TRACE("(%s,%u,%p,%p)\n", debugstr_w(ServerPrincName), AuthnSvc, GetKeyFn, Arg); TRACE("(%s,%lu,%p,%p)\n", debugstr_w(ServerPrincName), AuthnSvc, GetKeyFn, Arg);
status = find_security_package(AuthnSvc, &packages, &package); status = find_security_package(AuthnSvc, &packages, &package);
if (status != RPC_S_OK) if (status != RPC_S_OK)
@ -1487,7 +1487,7 @@ RPC_STATUS RPC_ENTRY RpcServerInqDefaultPrincNameA(ULONG AuthnSvc, RPC_CSTR *Pri
RPC_STATUS ret; RPC_STATUS ret;
RPC_WSTR principalW; RPC_WSTR principalW;
TRACE("%u, %p\n", AuthnSvc, PrincName); TRACE("%lu, %p\n", AuthnSvc, PrincName);
if ((ret = RpcServerInqDefaultPrincNameW( AuthnSvc, &principalW )) == RPC_S_OK) if ((ret = RpcServerInqDefaultPrincNameW( AuthnSvc, &principalW )) == RPC_S_OK)
{ {
@ -1504,7 +1504,7 @@ RPC_STATUS RPC_ENTRY RpcServerInqDefaultPrincNameW(ULONG AuthnSvc, RPC_WSTR *Pri
{ {
ULONG len = 0; ULONG len = 0;
FIXME("%u, %p\n", AuthnSvc, PrincName); FIXME("%lu, %p\n", AuthnSvc, PrincName);
if (AuthnSvc != RPC_C_AUTHN_WINNT) return RPC_S_UNKNOWN_AUTHN_SERVICE; if (AuthnSvc != RPC_C_AUTHN_WINNT) return RPC_S_UNKNOWN_AUTHN_SERVICE;
@ -1576,7 +1576,7 @@ RPC_STATUS WINAPI RpcMgmtWaitServerListen( void )
if (!wait_thread) if (!wait_thread)
break; break;
TRACE("waiting for thread %u\n", GetThreadId(wait_thread)); TRACE("waiting for thread %lu\n", GetThreadId(wait_thread));
LeaveCriticalSection(&listen_cs); LeaveCriticalSection(&listen_cs);
WaitForSingleObject(wait_thread, INFINITE); WaitForSingleObject(wait_thread, INFINITE);
EnterCriticalSection(&listen_cs); EnterCriticalSection(&listen_cs);
@ -1639,7 +1639,7 @@ RPC_STATUS WINAPI I_RpcServerStopListening( void )
*/ */
UINT WINAPI I_RpcWindowProc( void *hWnd, UINT Message, UINT wParam, ULONG lParam ) UINT WINAPI I_RpcWindowProc( void *hWnd, UINT Message, UINT wParam, ULONG lParam )
{ {
FIXME( "(%p,%08x,%08x,%08x): stub\n", hWnd, Message, wParam, lParam ); FIXME( "(%p,%08x,%08x,%08lx): stub\n", hWnd, Message, wParam, lParam );
return 0; return 0;
} }
@ -1693,7 +1693,7 @@ RPC_STATUS WINAPI RpcMgmtStatsVectorFree(RPC_STATS_VECTOR **StatsVector)
RPC_STATUS WINAPI RpcMgmtEpEltInqBegin(RPC_BINDING_HANDLE Binding, ULONG InquiryType, RPC_STATUS WINAPI RpcMgmtEpEltInqBegin(RPC_BINDING_HANDLE Binding, ULONG InquiryType,
RPC_IF_ID *IfId, ULONG VersOption, UUID *ObjectUuid, RPC_EP_INQ_HANDLE* InquiryContext) RPC_IF_ID *IfId, ULONG VersOption, UUID *ObjectUuid, RPC_EP_INQ_HANDLE* InquiryContext)
{ {
FIXME("(%p,%u,%p,%u,%p,%p): stub\n", FIXME("(%p,%lu,%p,%lu,%p,%p): stub\n",
Binding, InquiryType, IfId, VersOption, ObjectUuid, InquiryContext); Binding, InquiryType, IfId, VersOption, ObjectUuid, InquiryContext);
return RPC_S_INVALID_BINDING; return RPC_S_INVALID_BINDING;
} }
@ -1733,7 +1733,7 @@ RPC_STATUS WINAPI RpcMgmtSetAuthorizationFn(RPC_MGMT_AUTHORIZATION_FN fn)
*/ */
RPC_STATUS WINAPI RpcMgmtSetServerStackSize(ULONG ThreadStackSize) RPC_STATUS WINAPI RpcMgmtSetServerStackSize(ULONG ThreadStackSize)
{ {
FIXME("(0x%x): stub\n", ThreadStackSize); FIXME("(0x%lx): stub\n", ThreadStackSize);
return RPC_S_OK; return RPC_S_OK;
} }

View file

@ -101,7 +101,7 @@ static RPC_STATUS rpcrt4_conn_create_pipe(RpcConnection *conn)
RPC_MAX_PACKET_SIZE, RPC_MAX_PACKET_SIZE, 5000, NULL); RPC_MAX_PACKET_SIZE, RPC_MAX_PACKET_SIZE, 5000, NULL);
if (connection->pipe == INVALID_HANDLE_VALUE) if (connection->pipe == INVALID_HANDLE_VALUE)
{ {
WARN("CreateNamedPipe failed with error %d\n", GetLastError()); WARN("CreateNamedPipe failed with error %ld\n", GetLastError());
if (GetLastError() == ERROR_FILE_EXISTS) if (GetLastError() == ERROR_FILE_EXISTS)
return RPC_S_DUPLICATE_ENDPOINT; return RPC_S_DUPLICATE_ENDPOINT;
else else
@ -154,12 +154,12 @@ static RPC_STATUS rpcrt4_conn_open_pipe(RpcConnection *Connection, LPCSTR pname,
TRACE("retrying busy server\n"); TRACE("retrying busy server\n");
continue; continue;
} }
TRACE("connection failed, error=%x\n", err); TRACE("connection failed, error=%lx\n", err);
return RPC_S_SERVER_TOO_BUSY; return RPC_S_SERVER_TOO_BUSY;
} }
if (!wait || !WaitNamedPipeA(pname, NMPWAIT_WAIT_FOREVER)) { if (!wait || !WaitNamedPipeA(pname, NMPWAIT_WAIT_FOREVER)) {
err = GetLastError(); err = GetLastError();
WARN("connection failed, error=%x\n", err); WARN("connection failed, error=%lx\n", err);
return RPC_S_SERVER_UNAVAILABLE; return RPC_S_SERVER_UNAVAILABLE;
} }
} }
@ -214,7 +214,7 @@ static RPC_STATUS rpcrt4_protseq_ncalrpc_open_endpoint(RpcServerProtseq* protseq
DWORD process_id = GetCurrentProcessId(); DWORD process_id = GetCurrentProcessId();
ULONG id = InterlockedIncrement(&lrpc_nameless_id); ULONG id = InterlockedIncrement(&lrpc_nameless_id);
snprintf(generated_endpoint, sizeof(generated_endpoint), snprintf(generated_endpoint, sizeof(generated_endpoint),
"LRPC%08x.%08x", process_id, id); "LRPC%08lx.%08lx", process_id, id);
endpoint = generated_endpoint; endpoint = generated_endpoint;
} }
@ -274,7 +274,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_np_open_endpoint(RpcServerProtseq *protse
DWORD process_id = GetCurrentProcessId(); DWORD process_id = GetCurrentProcessId();
ULONG id = InterlockedExchangeAdd(&np_nameless_id, 1 ); ULONG id = InterlockedExchangeAdd(&np_nameless_id, 1 );
snprintf(generated_endpoint, sizeof(generated_endpoint), snprintf(generated_endpoint, sizeof(generated_endpoint),
"\\\\pipe\\\\%08x.%03x", process_id, id); "\\\\pipe\\\\%08lx.%03lx", process_id, id);
endpoint = generated_endpoint; endpoint = generated_endpoint;
} }
@ -317,7 +317,7 @@ static RPC_STATUS rpcrt4_ncacn_np_handoff(RpcConnection *old_conn, RpcConnection
new_conn->NetworkAddr = HeapAlloc(GetProcessHeap(), 0, len); new_conn->NetworkAddr = HeapAlloc(GetProcessHeap(), 0, len);
if (!GetComputerNameA(new_conn->NetworkAddr, &len)) if (!GetComputerNameA(new_conn->NetworkAddr, &len))
{ {
ERR("Failed to retrieve the computer name, error %u\n", GetLastError()); ERR("Failed to retrieve the computer name, error %lu\n", GetLastError());
return RPC_S_OUT_OF_RESOURCES; return RPC_S_OUT_OF_RESOURCES;
} }
@ -365,7 +365,7 @@ static RPC_STATUS rpcrt4_ncalrpc_handoff(RpcConnection *old_conn, RpcConnection
new_conn->NetworkAddr = HeapAlloc(GetProcessHeap(), 0, len); new_conn->NetworkAddr = HeapAlloc(GetProcessHeap(), 0, len);
if (!GetComputerNameA(new_conn->NetworkAddr, &len)) if (!GetComputerNameA(new_conn->NetworkAddr, &len))
{ {
ERR("Failed to retrieve the computer name, error %u\n", GetLastError()); ERR("Failed to retrieve the computer name, error %lu\n", GetLastError());
return RPC_S_OUT_OF_RESOURCES; return RPC_S_OUT_OF_RESOURCES;
} }
@ -595,7 +595,7 @@ static RPC_STATUS rpcrt4_conn_np_impersonate_client(RpcConnection *conn)
if (!ret) if (!ret)
{ {
DWORD error = GetLastError(); DWORD error = GetLastError();
WARN("ImpersonateNamedPipeClient failed with error %u\n", error); WARN("ImpersonateNamedPipeClient failed with error %lu\n", error);
switch (error) switch (error)
{ {
case ERROR_CANNOT_IMPERSONATE: case ERROR_CANNOT_IMPERSONATE:
@ -617,7 +617,7 @@ static RPC_STATUS rpcrt4_conn_np_revert_to_self(RpcConnection *conn)
ret = RevertToSelf(); ret = RevertToSelf();
if (!ret) if (!ret)
{ {
WARN("RevertToSelf failed with error %u\n", GetLastError()); WARN("RevertToSelf failed with error %lu\n", GetLastError());
return RPC_S_NO_CONTEXT_AVAILABLE; return RPC_S_NO_CONTEXT_AVAILABLE;
} }
return RPC_S_OK; return RPC_S_OK;
@ -677,7 +677,7 @@ static void *rpcrt4_protseq_np_get_wait_array(RpcServerProtseq *protseq, void *p
case STATUS_PENDING: case STATUS_PENDING:
break; break;
default: default:
ERR("pipe listen error %x\n", status); ERR("pipe listen error %lx\n", status);
continue; continue;
} }
@ -738,7 +738,7 @@ static int rpcrt4_protseq_np_wait_for_new_connection(RpcServerProtseq *protseq,
return 0; return 0;
else if (res == WAIT_FAILED) else if (res == WAIT_FAILED)
{ {
ERR("wait failed with error %d\n", GetLastError()); ERR("wait failed with error %ld\n", GetLastError());
return -1; return -1;
} }
else else
@ -755,7 +755,7 @@ static int rpcrt4_protseq_np_wait_for_new_connection(RpcServerProtseq *protseq,
if (conn->io_status.Status == STATUS_SUCCESS || conn->io_status.Status == STATUS_PIPE_CONNECTED) if (conn->io_status.Status == STATUS_SUCCESS || conn->io_status.Status == STATUS_PIPE_CONNECTED)
cconn = rpcrt4_spawn_connection(&conn->common); cconn = rpcrt4_spawn_connection(&conn->common);
else else
ERR("listen failed %x\n", conn->io_status.Status); ERR("listen failed %lx\n", conn->io_status.Status);
break; break;
} }
} }
@ -867,7 +867,7 @@ static RPC_STATUS rpcrt4_ncalrpc_inquire_auth_client(
RpcConnection *conn, RPC_AUTHZ_HANDLE *privs, RPC_WSTR *server_princ_name, RpcConnection *conn, RPC_AUTHZ_HANDLE *privs, RPC_WSTR *server_princ_name,
ULONG *authn_level, ULONG *authn_svc, ULONG *authz_svc, ULONG flags) ULONG *authn_level, ULONG *authn_svc, ULONG *authz_svc, ULONG flags)
{ {
TRACE("(%p, %p, %p, %p, %p, %p, 0x%x)\n", conn, privs, TRACE("(%p, %p, %p, %p, %p, %p, 0x%lx)\n", conn, privs,
server_princ_name, authn_level, authn_svc, authz_svc, flags); server_princ_name, authn_level, authn_svc, authz_svc, flags);
if (privs) if (privs)
@ -888,7 +888,7 @@ static RPC_STATUS rpcrt4_ncalrpc_inquire_auth_client(
*authz_svc = RPC_C_AUTHZ_NONE; *authz_svc = RPC_C_AUTHZ_NONE;
} }
if (flags) if (flags)
FIXME("flags 0x%x not implemented\n", flags); FIXME("flags 0x%lx not implemented\n", flags);
return RPC_S_OK; return RPC_S_OK;
} }
@ -1082,7 +1082,7 @@ static BOOL rpcrt4_sock_wait_for_recv(RpcConnection_tcp *tcpc)
case WAIT_OBJECT_0 + 1: case WAIT_OBJECT_0 + 1:
return FALSE; return FALSE;
default: default:
ERR("WaitForMultipleObjects() failed with error %d\n", GetLastError()); ERR("WaitForMultipleObjects() failed with error %ld\n", GetLastError());
return FALSE; return FALSE;
} }
} }
@ -1101,7 +1101,7 @@ static BOOL rpcrt4_sock_wait_for_send(RpcConnection_tcp *tcpc)
case WAIT_OBJECT_0: case WAIT_OBJECT_0:
return TRUE; return TRUE;
default: default:
ERR("WaitForMultipleObjects() failed with error %d\n", GetLastError()); ERR("WaitForMultipleObjects() failed with error %ld\n", GetLastError());
return FALSE; return FALSE;
} }
} }
@ -1597,7 +1597,7 @@ static int rpcrt4_protseq_sock_wait_for_new_connection(RpcServerProtseq *protseq
return 0; return 0;
if (res == WAIT_FAILED) if (res == WAIT_FAILED)
{ {
ERR("wait failed with error %d\n", GetLastError()); ERR("wait failed with error %ld\n", GetLastError());
return -1; return -1;
} }
@ -1689,7 +1689,7 @@ static RPC_STATUS wait_async_request(RpcHttpAsyncData *async_data, BOOL call_ret
if(GetLastError() != ERROR_IO_PENDING) { if(GetLastError() != ERROR_IO_PENDING) {
RpcHttpAsyncData_Release(async_data); RpcHttpAsyncData_Release(async_data);
ERR("Request failed with error %d\n", GetLastError()); ERR("Request failed with error %ld\n", GetLastError());
return RPC_S_SERVER_UNAVAILABLE; return RPC_S_SERVER_UNAVAILABLE;
} }
@ -1863,7 +1863,7 @@ static RPC_STATUS rpcrt4_http_check_response(HINTERNET hor)
ret = HttpQueryInfoW(hor, HTTP_QUERY_STATUS_TEXT, status_text, &size, &index); ret = HttpQueryInfoW(hor, HTTP_QUERY_STATUS_TEXT, status_text, &size, &index);
} }
ERR("server returned: %d %s\n", status_code, ret ? debugstr_w(status_text) : "<status text unavailable>"); ERR("server returned: %ld %s\n", status_code, ret ? debugstr_w(status_text) : "<status text unavailable>");
if(status_text != buf) HeapFree(GetProcessHeap(), 0, status_text); if(status_text != buf) HeapFree(GetProcessHeap(), 0, status_text);
if (status_code == HTTP_STATUS_DENIED) if (status_code == HTTP_STATUS_DENIED)
@ -1952,7 +1952,7 @@ static RPC_STATUS rpcrt4_http_internet_connect(RpcConnection_http *httpc)
HeapFree(GetProcessHeap(), 0, user); HeapFree(GetProcessHeap(), 0, user);
HeapFree(GetProcessHeap(), 0, proxy); HeapFree(GetProcessHeap(), 0, proxy);
HeapFree(GetProcessHeap(), 0, servername); HeapFree(GetProcessHeap(), 0, servername);
ERR("InternetOpenW failed with error %d\n", GetLastError()); ERR("InternetOpenW failed with error %ld\n", GetLastError());
return RPC_S_SERVER_UNAVAILABLE; return RPC_S_SERVER_UNAVAILABLE;
} }
InternetSetStatusCallbackW(httpc->app_info, rpcrt4_http_internet_callback); InternetSetStatusCallbackW(httpc->app_info, rpcrt4_http_internet_callback);
@ -1986,7 +1986,7 @@ static RPC_STATUS rpcrt4_http_internet_connect(RpcConnection_http *httpc)
if (!httpc->session) if (!httpc->session)
{ {
ERR("InternetConnectW failed with error %d\n", GetLastError()); ERR("InternetConnectW failed with error %ld\n", GetLastError());
HeapFree(GetProcessHeap(), 0, servername); HeapFree(GetProcessHeap(), 0, servername);
return RPC_S_SERVER_UNAVAILABLE; return RPC_S_SERVER_UNAVAILABLE;
} }
@ -2029,7 +2029,7 @@ static int rpcrt4_http_async_read(HINTERNET req, RpcHttpAsyncData *async_data, H
HeapFree(GetProcessHeap(), 0, async_data->inet_buffers.lpvBuffer); HeapFree(GetProcessHeap(), 0, async_data->inet_buffers.lpvBuffer);
async_data->inet_buffers.lpvBuffer = NULL; async_data->inet_buffers.lpvBuffer = NULL;
TRACE("%p %p %u -> %u\n", req, buffer, count, status); TRACE("%p %p %u -> %lu\n", req, buffer, count, status);
return status == RPC_S_OK ? count : -1; return status == RPC_S_OK ? count : -1;
} }
@ -2100,7 +2100,7 @@ static RPC_STATUS rpcrt4_http_prepare_in_pipe(HINTERNET in_request, RpcHttpAsync
RPCRT4_FreeHeader(hdr); RPCRT4_FreeHeader(hdr);
if (!ret) if (!ret)
{ {
ERR("InternetWriteFile failed with error %d\n", GetLastError()); ERR("InternetWriteFile failed with error %ld\n", GetLastError());
return RPC_S_SERVER_UNAVAILABLE; return RPC_S_SERVER_UNAVAILABLE;
} }
@ -2201,7 +2201,7 @@ static RPC_STATUS rpcrt4_http_prepare_out_pipe(HINTERNET out_request, RpcHttpAsy
&field1); &field1);
HeapFree(GetProcessHeap(), 0, data_from_server); HeapFree(GetProcessHeap(), 0, data_from_server);
if (status != RPC_S_OK) return status; if (status != RPC_S_OK) return status;
TRACE("received (%d) from first prepare header\n", field1); TRACE("received (%ld) from first prepare header\n", field1);
for (;;) for (;;)
{ {
@ -2224,7 +2224,7 @@ static RPC_STATUS rpcrt4_http_prepare_out_pipe(HINTERNET out_request, RpcHttpAsy
&field3); &field3);
HeapFree(GetProcessHeap(), 0, data_from_server); HeapFree(GetProcessHeap(), 0, data_from_server);
if (status != RPC_S_OK) return status; if (status != RPC_S_OK) return status;
TRACE("received (0x%08x 0x%08x %d) from second prepare header\n", field1, *flow_control_increment, field3); TRACE("received (0x%08lx 0x%08lx %ld) from second prepare header\n", field1, *flow_control_increment, field3);
return RPC_S_OK; return RPC_S_OK;
} }
@ -2536,7 +2536,7 @@ static RPC_STATUS do_authorization(HINTERNET request, SEC_WCHAR *servername,
} }
else else
{ {
ERR("InitializeSecurityContextW failed with error 0x%08x\n", ret); ERR("InitializeSecurityContextW failed with error 0x%08lx\n", ret);
HeapFree(GetProcessHeap(), 0, out.pvBuffer); HeapFree(GetProcessHeap(), 0, out.pvBuffer);
break; break;
} }
@ -2544,7 +2544,7 @@ static RPC_STATUS do_authorization(HINTERNET request, SEC_WCHAR *servername,
break; break;
} }
default: default:
FIXME("scheme %u not supported\n", creds->AuthnSchemes[0]); FIXME("scheme %lu not supported\n", creds->AuthnSchemes[0]);
break; break;
} }
@ -2584,7 +2584,7 @@ static RPC_STATUS insert_authorization_header(HINTERNET request, ULONG scheme, c
scheme_len = ARRAY_SIZE(ntlmW); scheme_len = ARRAY_SIZE(ntlmW);
break; break;
default: default:
ERR("unknown scheme %u\n", scheme); ERR("unknown scheme %lu\n", scheme);
return RPC_S_SERVER_UNAVAILABLE; return RPC_S_SERVER_UNAVAILABLE;
} }
if ((header = HeapAlloc(GetProcessHeap(), 0, (auth_len + scheme_len + len + 2) * sizeof(WCHAR)))) if ((header = HeapAlloc(GetProcessHeap(), 0, (auth_len + scheme_len + len + 2) * sizeof(WCHAR))))
@ -2780,7 +2780,7 @@ static RPC_STATUS rpcrt4_ncacn_http_open(RpcConnection* Connection)
flags, (DWORD_PTR)httpc->async_data); flags, (DWORD_PTR)httpc->async_data);
if (!httpc->in_request) if (!httpc->in_request)
{ {
ERR("HttpOpenRequestW failed with error %d\n", GetLastError()); ERR("HttpOpenRequestW failed with error %ld\n", GetLastError());
HeapFree(GetProcessHeap(), 0, url); HeapFree(GetProcessHeap(), 0, url);
return RPC_S_SERVER_UNAVAILABLE; return RPC_S_SERVER_UNAVAILABLE;
} }
@ -2807,7 +2807,7 @@ static RPC_STATUS rpcrt4_ncacn_http_open(RpcConnection* Connection)
HeapFree(GetProcessHeap(), 0, url); HeapFree(GetProcessHeap(), 0, url);
if (!httpc->out_request) if (!httpc->out_request)
{ {
ERR("HttpOpenRequestW failed with error %d\n", GetLastError()); ERR("HttpOpenRequestW failed with error %ld\n", GetLastError());
return RPC_S_SERVER_UNAVAILABLE; return RPC_S_SERVER_UNAVAILABLE;
} }
@ -2881,7 +2881,7 @@ again:
/* read packet common header */ /* read packet common header */
dwRead = rpcrt4_ncacn_http_read(Connection, &common_hdr, sizeof(common_hdr)); dwRead = rpcrt4_ncacn_http_read(Connection, &common_hdr, sizeof(common_hdr));
if (dwRead != sizeof(common_hdr)) { if (dwRead != sizeof(common_hdr)) {
WARN("Short read of header, %d bytes\n", dwRead); WARN("Short read of header, %ld bytes\n", dwRead);
status = RPC_S_PROTOCOL_ERROR; status = RPC_S_PROTOCOL_ERROR;
goto fail; goto fail;
} }
@ -2914,7 +2914,7 @@ again:
/* read the rest of packet header */ /* read the rest of packet header */
dwRead = rpcrt4_ncacn_http_read(Connection, &(*Header)->common + 1, hdr_length - sizeof(common_hdr)); dwRead = rpcrt4_ncacn_http_read(Connection, &(*Header)->common + 1, hdr_length - sizeof(common_hdr));
if (dwRead != hdr_length - sizeof(common_hdr)) { if (dwRead != hdr_length - sizeof(common_hdr)) {
WARN("bad header length, %d bytes, hdr_length %d\n", dwRead, hdr_length); WARN("bad header length, %ld bytes, hdr_length %ld\n", dwRead, hdr_length);
status = RPC_S_PROTOCOL_ERROR; status = RPC_S_PROTOCOL_ERROR;
goto fail; goto fail;
} }
@ -2931,7 +2931,7 @@ again:
dwRead = rpcrt4_ncacn_http_read(Connection, *Payload, common_hdr.frag_len - hdr_length); dwRead = rpcrt4_ncacn_http_read(Connection, *Payload, common_hdr.frag_len - hdr_length);
if (dwRead != common_hdr.frag_len - hdr_length) if (dwRead != common_hdr.frag_len - hdr_length)
{ {
WARN("bad data length, %d/%d\n", dwRead, common_hdr.frag_len - hdr_length); WARN("bad data length, %ld/%ld\n", dwRead, common_hdr.frag_len - hdr_length);
status = RPC_S_PROTOCOL_ERROR; status = RPC_S_PROTOCOL_ERROR;
goto fail; goto fail;
} }
@ -2969,7 +2969,7 @@ again:
&pipe_uuid); &pipe_uuid);
if (status != RPC_S_OK) if (status != RPC_S_OK)
goto fail; goto fail;
TRACE("received http flow control header (0x%x, 0x%x, %s)\n", TRACE("received http flow control header (0x%lx, 0x%lx, %s)\n",
bytes_transmitted, flow_control_increment, debugstr_guid(&pipe_uuid)); bytes_transmitted, flow_control_increment, debugstr_guid(&pipe_uuid));
/* FIXME: do something with parsed data */ /* FIXME: do something with parsed data */
} }
@ -2991,7 +2991,7 @@ again:
httpc->bytes_received += common_hdr.frag_len; httpc->bytes_received += common_hdr.frag_len;
TRACE("httpc->bytes_received = 0x%x\n", httpc->bytes_received); TRACE("httpc->bytes_received = 0x%lx\n", httpc->bytes_received);
if (httpc->bytes_received > httpc->flow_control_mark) if (httpc->bytes_received > httpc->flow_control_mark)
{ {
@ -3003,7 +3003,7 @@ again:
{ {
DWORD bytes_written; DWORD bytes_written;
BOOL ret2; BOOL ret2;
TRACE("sending flow control packet at 0x%x\n", httpc->bytes_received); TRACE("sending flow control packet at 0x%lx\n", httpc->bytes_received);
ret2 = InternetWriteFile(httpc->in_request, hdr, hdr->common.frag_len, &bytes_written); ret2 = InternetWriteFile(httpc->in_request, hdr, hdr->common.frag_len, &bytes_written);
RPCRT4_FreeHeader(hdr); RPCRT4_FreeHeader(hdr);
if (ret2) if (ret2)
@ -3358,7 +3358,7 @@ void rpcrt4_conn_release_and_wait(RpcConnection *connection)
RpcConnection *RPCRT4_GrabConnection(RpcConnection *connection) RpcConnection *RPCRT4_GrabConnection(RpcConnection *connection)
{ {
LONG ref = InterlockedIncrement(&connection->ref); LONG ref = InterlockedIncrement(&connection->ref);
TRACE("%p ref=%u\n", connection, ref); TRACE("%p ref=%lu\n", connection, ref);
return connection; return connection;
} }
@ -3383,7 +3383,7 @@ void RPCRT4_ReleaseConnection(RpcConnection *connection)
ref = InterlockedDecrement(&connection->ref); ref = InterlockedDecrement(&connection->ref);
} }
TRACE("%p ref=%u\n", connection, ref); TRACE("%p ref=%lu\n", connection, ref);
if (!ref) if (!ref)
{ {

View file

@ -752,7 +752,7 @@ void WINAPI I_RpcFree(void *Object)
*/ */
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status) LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
{ {
TRACE("(%d)\n", status); TRACE("(%ld)\n", status);
switch (status) switch (status)
{ {
case ERROR_ACCESS_DENIED: return STATUS_ACCESS_DENIED; case ERROR_ACCESS_DENIED: return STATUS_ACCESS_DENIED;
@ -871,7 +871,7 @@ LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
*/ */
int WINAPI RpcExceptionFilter(ULONG ExceptionCode) int WINAPI RpcExceptionFilter(ULONG ExceptionCode)
{ {
TRACE("0x%x\n", ExceptionCode); TRACE("0x%lx\n", ExceptionCode);
switch (ExceptionCode) switch (ExceptionCode)
{ {
case STATUS_DATATYPE_MISALIGNMENT: case STATUS_DATATYPE_MISALIGNMENT:
@ -920,7 +920,7 @@ RPC_STATUS RPC_ENTRY RpcErrorSaveErrorInfo(RPC_ERROR_ENUM_HANDLE *EnumHandle, vo
*/ */
RPC_STATUS RPC_ENTRY RpcErrorLoadErrorInfo(void *ErrorBlob, SIZE_T BlobSize, RPC_ERROR_ENUM_HANDLE *EnumHandle) RPC_STATUS RPC_ENTRY RpcErrorLoadErrorInfo(void *ErrorBlob, SIZE_T BlobSize, RPC_ERROR_ENUM_HANDLE *EnumHandle)
{ {
FIXME("(%p %lu %p): stub\n", ErrorBlob, BlobSize, EnumHandle); FIXME("(%p %Iu %p): stub\n", ErrorBlob, BlobSize, EnumHandle);
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
@ -938,7 +938,7 @@ RPC_STATUS RPC_ENTRY RpcErrorGetNextRecord(RPC_ERROR_ENUM_HANDLE *EnumHandle, BO
*/ */
RPC_STATUS RPC_ENTRY RpcMgmtSetCancelTimeout(LONG Timeout) RPC_STATUS RPC_ENTRY RpcMgmtSetCancelTimeout(LONG Timeout)
{ {
FIXME("(%d): stub\n", Timeout); FIXME("(%ld): stub\n", Timeout);
return RPC_S_OK; return RPC_S_OK;
} }
@ -1077,7 +1077,7 @@ RPC_STATUS RPC_ENTRY RpcCancelThreadEx(void* ThreadHandle, LONG Timeout)
{ {
DWORD target_tid; DWORD target_tid;
FIXME("(%p, %d)\n", ThreadHandle, Timeout); FIXME("(%p, %ld)\n", ThreadHandle, Timeout);
target_tid = GetThreadId(ThreadHandle); target_tid = GetThreadId(ThreadHandle);
if (!target_tid) if (!target_tid)
@ -1085,7 +1085,7 @@ RPC_STATUS RPC_ENTRY RpcCancelThreadEx(void* ThreadHandle, LONG Timeout)
if (Timeout) if (Timeout)
{ {
FIXME("(%p, %d)\n", ThreadHandle, Timeout); FIXME("(%p, %ld)\n", ThreadHandle, Timeout);
return RPC_S_OK; return RPC_S_OK;
} }
else else