From e86eb8efa6975fac1278a4089b36fb098cb2416e Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Sun, 4 Jan 2009 01:49:14 +0100 Subject: [PATCH] include: Change RPC_STATUS from long to LONG for Win64 compatibility. Also fix the compiler warnings introduced by this change. --- dlls/advapi32/crypt.c | 2 +- dlls/ole32/rpc.c | 16 +++--- dlls/oleaut32/tests/typelib.c | 2 +- dlls/rpcrt4/ndr_clientserver.c | 2 +- dlls/rpcrt4/rpc_assoc.c | 2 +- dlls/rpcrt4/rpc_epmap.c | 2 +- dlls/rpcrt4/rpc_message.c | 2 +- dlls/rpcrt4/rpc_server.c | 2 +- dlls/rpcrt4/rpcrt4_main.c | 2 +- dlls/rpcrt4/tests/ndr_marshall.c | 18 +++--- dlls/rpcrt4/tests/rpc.c | 94 ++++++++++++++++---------------- dlls/rpcrt4/tests/rpc_async.c | 12 ++-- dlls/rpcrt4/tests/server.c | 10 ++-- include/rpc.h | 2 +- programs/rpcss/epmp.c | 2 +- 15 files changed, 85 insertions(+), 85 deletions(-) diff --git a/dlls/advapi32/crypt.c b/dlls/advapi32/crypt.c index 5d0b15e78fb..8ef0a5f5220 100644 --- a/dlls/advapi32/crypt.c +++ b/dlls/advapi32/crypt.c @@ -305,7 +305,7 @@ static void CRYPT_CreateMachineGuid(void) '%','0','2','x','%','0','2','x', '%','0','2','x',0 }; - pUuidCreate = GetProcAddress(lib, "UuidCreate"); + pUuidCreate = (void *)GetProcAddress(lib, "UuidCreate"); rs = pUuidCreate(&uuid); if (rs == S_OK) { diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c index 74d7968f3b4..caad3448e11 100644 --- a/dlls/ole32/rpc.c +++ b/dlls/ole32/rpc.c @@ -568,7 +568,7 @@ static HRESULT WINAPI ServerRpcChannelBuffer_GetBuffer(LPRPCCHANNELBUFFER iface, /* save away the message state again */ msg->Handle = message_state; - TRACE("-- %ld\n", status); + TRACE("-- %d\n", status); return HRESULT_FROM_WIN32(status); } @@ -751,7 +751,7 @@ static HRESULT WINAPI ClientRpcChannelBuffer_GetBuffer(LPRPCCHANNELBUFFER iface, HeapFree(GetProcessHeap(), 0, channel_hook_data); - TRACE("-- %ld\n", status); + TRACE("-- %d\n", status); return HRESULT_FROM_WIN32(status); } @@ -771,7 +771,7 @@ static DWORD WINAPI rpc_sendreceive_thread(LPVOID param) * RPC functions do */ data->status = I_RpcSendReceive((RPC_MESSAGE *)data->msg); - TRACE("completed with status 0x%lx\n", data->status); + TRACE("completed with status 0x%x\n", data->status); SetEvent(data->handle); @@ -893,7 +893,7 @@ static HRESULT WINAPI ClientRpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER ifac orpcthat.flags = ORPCF_NULL; orpcthat.extensions = NULL; - TRACE("RPC call status: 0x%lx\n", status); + TRACE("RPC call status: 0x%x\n", status); if (status != RPC_S_OK) hr = HRESULT_FROM_WIN32(status); @@ -967,7 +967,7 @@ static HRESULT WINAPI ServerRpcChannelBuffer_FreeBuffer(LPRPCCHANNELBUFFER iface msg->Handle = message_state; - TRACE("-- %ld\n", status); + TRACE("-- %d\n", status); return HRESULT_FROM_WIN32(status); } @@ -1003,7 +1003,7 @@ static HRESULT WINAPI ClientRpcChannelBuffer_FreeBuffer(LPRPCCHANNELBUFFER iface IRpcChannelBuffer_Release(message_state->params.chan); HeapFree(GetProcessHeap(), 0, message_state); - TRACE("-- %ld\n", status); + TRACE("-- %d\n", status); return HRESULT_FROM_WIN32(status); } @@ -1104,7 +1104,7 @@ HRESULT RPC_CreateClientChannel(const OXID *oxid, const IPID *ipid, if (status != RPC_S_OK) { - ERR("Couldn't get binding for endpoint %s, status = %ld\n", debugstr_w(endpoint), status); + ERR("Couldn't get binding for endpoint %s, status = %d\n", debugstr_w(endpoint), status); return HRESULT_FROM_WIN32(status); } @@ -1536,7 +1536,7 @@ HRESULT RPC_RegisterInterface(REFIID riid) list_add_tail(®istered_interfaces, &rif->entry); else { - ERR("RpcServerRegisterIfEx failed with error %ld\n", status); + ERR("RpcServerRegisterIfEx failed with error %d\n", status); HeapFree(GetProcessHeap(), 0, rif); hr = HRESULT_FROM_WIN32(status); } diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 8b564666344..d8a6675e6b7 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -649,7 +649,7 @@ static void test_QueryPathOfRegTypeLib(void) BSTR path; status = UuidCreate(&uid); - ok(!status || status == RPC_S_UUID_LOCAL_ONLY, "UuidCreate error %08lx\n", status); + ok(!status || status == RPC_S_UUID_LOCAL_ONLY, "UuidCreate error %08x\n", status); StringFromGUID2(&uid, uid_str, 40); /*trace("GUID: %s\n", wine_dbgstr_w(uid_str));*/ diff --git a/dlls/rpcrt4/ndr_clientserver.c b/dlls/rpcrt4/ndr_clientserver.c index a051489dab2..502faa10739 100644 --- a/dlls/rpcrt4/ndr_clientserver.c +++ b/dlls/rpcrt4/ndr_clientserver.c @@ -232,7 +232,7 @@ RPC_STATUS RPC_ENTRY NdrMapCommAndFaultStatus( PMIDL_STUB_MESSAGE pStubMsg, ULONG *pFaultStatus, RPC_STATUS Status ) { - TRACE("(%p, %p, %p, %ld)\n", pStubMsg, pCommStatus, pFaultStatus, Status); + TRACE("(%p, %p, %p, %d)\n", pStubMsg, pCommStatus, pFaultStatus, Status); switch (Status) { diff --git a/dlls/rpcrt4/rpc_assoc.c b/dlls/rpcrt4/rpc_assoc.c index e8f367659d7..32e951a929a 100644 --- a/dlls/rpcrt4/rpc_assoc.c +++ b/dlls/rpcrt4/rpc_assoc.c @@ -240,7 +240,7 @@ static RPC_STATUS RpcAssoc_BindConnection(const RpcAssoc *assoc, RpcConnection * status = RPCRT4_ReceiveWithAuth(conn, &response_hdr, &msg, &auth_data, &auth_length); if (status != RPC_S_OK) { - ERR("receive failed with error %ld\n", status); + ERR("receive failed with error %d\n", status); return status; } diff --git a/dlls/rpcrt4/rpc_epmap.c b/dlls/rpcrt4/rpc_epmap.c index de200f42a65..36170dcb554 100644 --- a/dlls/rpcrt4/rpc_epmap.c +++ b/dlls/rpcrt4/rpc_epmap.c @@ -444,7 +444,7 @@ RPC_STATUS WINAPI RpcEpResolveBinding( RPC_BINDING_HANDLE Binding, RPC_IF_HANDLE if (!resolved_endpoint) { status = TowerExplode(towers[i], NULL, NULL, NULL, &resolved_endpoint, NULL); - TRACE("status = %ld\n", status); + TRACE("status = %d\n", status); } I_RpcFree(towers[i]); } diff --git a/dlls/rpcrt4/rpc_message.c b/dlls/rpcrt4/rpc_message.c index e59fc81d809..72f73b95f29 100644 --- a/dlls/rpcrt4/rpc_message.c +++ b/dlls/rpcrt4/rpc_message.c @@ -1279,7 +1279,7 @@ RPC_STATUS WINAPI I_RpcReceive(PRPC_MESSAGE pMsg) conn = pMsg->ReservedForRuntime; status = RPCRT4_Receive(conn, &hdr, pMsg); if (status != RPC_S_OK) { - WARN("receive failed with error %lx\n", status); + WARN("receive failed with error %x\n", status); goto fail; } diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c index 5fa96321792..60c32027685 100644 --- a/dlls/rpcrt4/rpc_server.c +++ b/dlls/rpcrt4/rpc_server.c @@ -380,7 +380,7 @@ static DWORD CALLBACK RPCRT4_io_thread(LPVOID the_arg) status = RPCRT4_Receive(conn, &hdr, msg); if (status != RPC_S_OK) { - WARN("receive failed with error %lx\n", status); + WARN("receive failed with error %x\n", status); HeapFree(GetProcessHeap(), 0, msg); break; } diff --git a/dlls/rpcrt4/rpcrt4_main.c b/dlls/rpcrt4/rpcrt4_main.c index 177c82caadb..537a00537bc 100644 --- a/dlls/rpcrt4/rpcrt4_main.c +++ b/dlls/rpcrt4/rpcrt4_main.c @@ -715,7 +715,7 @@ void WINAPI I_RpcFree(void *Object) */ LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status) { - TRACE("(%ld)\n", status); + TRACE("(%d)\n", status); switch (status) { case ERROR_ACCESS_DENIED: return STATUS_ACCESS_DENIED; diff --git a/dlls/rpcrt4/tests/ndr_marshall.c b/dlls/rpcrt4/tests/ndr_marshall.c index 7b84780f8fc..418c6eedf17 100644 --- a/dlls/rpcrt4/tests/ndr_marshall.c +++ b/dlls/rpcrt4/tests/ndr_marshall.c @@ -1945,11 +1945,11 @@ static void test_ndr_buffer(void) StubDesc.RpcInterfaceInformation = (void *)&IFoo___RpcServerInterface; status = RpcServerUseProtseqEp(ncalrpc, 20, endpoint, NULL); - ok(RPC_S_OK == status, "RpcServerUseProtseqEp failed with status %lu\n", status); + ok(RPC_S_OK == status, "RpcServerUseProtseqEp failed with status %u\n", status); status = RpcServerRegisterIf(IFoo_v0_0_s_ifspec, NULL, NULL); - ok(RPC_S_OK == status, "RpcServerRegisterIf failed with status %lu\n", status); + ok(RPC_S_OK == status, "RpcServerRegisterIf failed with status %u\n", status); status = RpcServerListen(1, 20, TRUE); - ok(RPC_S_OK == status, "RpcServerListen failed with status %lu\n", status); + ok(RPC_S_OK == status, "RpcServerListen failed with status %u\n", status); if (status != RPC_S_OK) { /* Failed to create a server, running client tests is useless */ @@ -1957,10 +1957,10 @@ static void test_ndr_buffer(void) } status = RpcStringBindingCompose(NULL, ncalrpc, NULL, endpoint, NULL, &binding); - ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%u)\n", status); status = RpcBindingFromStringBinding(binding, &Handle); - ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%u)\n", status); RpcStringFree(&binding); NdrClientInitializeNew(&RpcMessage, &StubMsg, &StubDesc, 5); @@ -2003,7 +2003,7 @@ todo_wine RpcBindingFree(&Handle); status = RpcServerUnregisterIf(NULL, NULL, FALSE); - ok(status == RPC_S_OK, "RpcServerUnregisterIf failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcServerUnregisterIf failed (%u)\n", status); } static void test_NdrMapCommAndFaultStatus(void) @@ -2022,7 +2022,7 @@ static void test_NdrMapCommAndFaultStatus(void) ULONG expected_comm_status = 0; ULONG expected_fault_status = 0; status = NdrMapCommAndFaultStatus(&StubMsg, &comm_status, &fault_status, rpc_status); - ok(status == RPC_S_OK, "NdrMapCommAndFaultStatus failed with error %ld\n", status); + ok(status == RPC_S_OK, "NdrMapCommAndFaultStatus failed with error %d\n", status); switch (rpc_status) { case ERROR_INVALID_HANDLE: @@ -2042,9 +2042,9 @@ static void test_NdrMapCommAndFaultStatus(void) default: expected_fault_status = rpc_status; } - ok(comm_status == expected_comm_status, "NdrMapCommAndFaultStatus should have mapped %ld to comm status %d instead of %d\n", + ok(comm_status == expected_comm_status, "NdrMapCommAndFaultStatus should have mapped %d to comm status %d instead of %d\n", rpc_status, expected_comm_status, comm_status); - ok(fault_status == expected_fault_status, "NdrMapCommAndFaultStatus should have mapped %ld to fault status %d instead of %d\n", + ok(fault_status == expected_fault_status, "NdrMapCommAndFaultStatus should have mapped %d to fault status %d instead of %d\n", rpc_status, expected_fault_status, fault_status); } } diff --git a/dlls/rpcrt4/tests/rpc.c b/dlls/rpcrt4/tests/rpc.c index 069ead13e7c..9ac6d271cae 100644 --- a/dlls/rpcrt4/tests/rpc.c +++ b/dlls/rpcrt4/tests/rpc.c @@ -224,68 +224,68 @@ static void test_rpc_ncacn_ip_tcp(void) status = RpcMgmtStopServerListening(NULL); todo_wine { ok(status == RPC_S_NOT_LISTENING, - "wrong RpcMgmtStopServerListening error (%lu)\n", status); + "wrong RpcMgmtStopServerListening error (%u)\n", status); } status = RpcMgmtWaitServerListen(); ok(status == RPC_S_NOT_LISTENING, - "wrong RpcMgmtWaitServerListen error status (%lu)\n", status); + "wrong RpcMgmtWaitServerListen error status (%u)\n", status); status = RpcServerListen(1, 20, FALSE); ok(status == RPC_S_NO_PROTSEQS_REGISTERED, - "wrong RpcServerListen error (%lu)\n", status); + "wrong RpcServerListen error (%u)\n", status); status = RpcServerUseProtseqEp(ncacn_ip_tcp, 20, endpoint, NULL); - ok(status == RPC_S_OK, "RpcServerUseProtseqEp failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcServerUseProtseqEp failed (%u)\n", status); status = RpcServerRegisterIf(IFoo_v0_0_s_ifspec, NULL, NULL); - ok(status == RPC_S_OK, "RpcServerRegisterIf failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcServerRegisterIf failed (%u)\n", status); status = RpcServerListen(1, 20, TRUE); todo_wine { - ok(status == RPC_S_OK, "RpcServerListen failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcServerListen failed (%u)\n", status); } status = RpcServerListen(1, 20, TRUE); todo_wine { ok(status == RPC_S_ALREADY_LISTENING, - "wrong RpcServerListen error (%lu)\n", status); + "wrong RpcServerListen error (%u)\n", status); } status = RpcStringBindingCompose(NULL, ncacn_ip_tcp, address, endpoint, NULL, &binding); - ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%u)\n", status); status = RpcBindingFromStringBinding(binding, &IFoo_IfHandle); - ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%lu)\n", + ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%u)\n", status); status = RpcBindingSetAuthInfo(IFoo_IfHandle, NULL, RPC_C_AUTHN_LEVEL_NONE, RPC_C_AUTHN_WINNT, NULL, RPC_C_AUTHZ_NAME); ok(status == RPC_S_OK || broken(status == RPC_S_UNKNOWN_AUTHN_SERVICE), /* win9x */ - "RpcBindingSetAuthInfo failed (%lu)\n", status); + "RpcBindingSetAuthInfo failed (%u)\n", status); status = RpcMgmtStopServerListening(NULL); - ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%lu)\n", + ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%u)\n", status); status = RpcMgmtStopServerListening(NULL); - ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%lu)\n", + ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%u)\n", status); status = RpcServerUnregisterIf(NULL, NULL, FALSE); - ok(status == RPC_S_OK, "RpcServerUnregisterIf failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcServerUnregisterIf failed (%u)\n", status); status = RpcMgmtWaitServerListen(); todo_wine { - ok(status == RPC_S_OK, "RpcMgmtWaitServerListen failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcMgmtWaitServerListen failed (%u)\n", status); } status = RpcStringFree(&binding); - ok(status == RPC_S_OK, "RpcStringFree failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcStringFree failed (%u)\n", status); status = RpcBindingFree(&IFoo_IfHandle); - ok(status == RPC_S_OK, "RpcBindingFree failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcBindingFree failed (%u)\n", status); } /* this is what's generated with MS/RPC - it includes an extra 2 @@ -331,7 +331,7 @@ static void test_towers(void) ret = TowerConstruct(&mapi_if_id, &ndr_syntax, "ncacn_ip_tcp", "135", "10.0.0.1", &tower); ok(ret == RPC_S_OK || broken(ret == RPC_S_INVALID_RPC_PROTSEQ), /* Vista */ - "TowerConstruct failed with error %ld\n", ret); + "TowerConstruct failed with error %d\n", ret); if (ret == RPC_S_INVALID_RPC_PROTSEQ) { /* Windows Vista fails with this error and crashes if we continue */ @@ -364,7 +364,7 @@ static void test_towers(void) } ret = TowerExplode(tower, &object, &syntax, &protseq, &endpoint, &address); - ok(ret == RPC_S_OK, "TowerExplode failed with error %ld\n", ret); + ok(ret == RPC_S_OK, "TowerExplode failed with error %d\n", ret); ok(!memcmp(&object, &mapi_if_id, sizeof(mapi_if_id)), "object id didn't match\n"); ok(!memcmp(&syntax, &ndr_syntax, sizeof(syntax)), "syntax id didn't match\n"); ok(!strcmp(protseq, "ncacn_ip_tcp"), "protseq was \"%s\" instead of \"ncacn_ip_tcp\"\n", protseq); @@ -376,15 +376,15 @@ static void test_towers(void) I_RpcFree(address); ret = TowerExplode(tower, NULL, NULL, NULL, NULL, NULL); - ok(ret == RPC_S_OK, "TowerExplode failed with error %ld\n", ret); + ok(ret == RPC_S_OK, "TowerExplode failed with error %d\n", ret); I_RpcFree(tower); /* test the behaviour for ip_tcp with name instead of dotted IP notation */ ret = TowerConstruct(&mapi_if_id, &ndr_syntax, "ncacn_ip_tcp", "135", "localhost", &tower); - ok(ret == RPC_S_OK, "TowerConstruct failed with error %ld\n", ret); + ok(ret == RPC_S_OK, "TowerConstruct failed with error %d\n", ret); ret = TowerExplode(tower, NULL, NULL, NULL, NULL, &address); - ok(ret == RPC_S_OK, "TowerExplode failed with error %ld\n", ret); + ok(ret == RPC_S_OK, "TowerExplode failed with error %d\n", ret); ok(!strcmp(address, "0.0.0.0") || broken(!strcmp(address, "255.255.255.255")), "address was \"%s\" instead of \"0.0.0.0\"\n", address); @@ -394,11 +394,11 @@ static void test_towers(void) /* test the behaviour for np with no address */ ret = TowerConstruct(&mapi_if_id, &ndr_syntax, "ncacn_np", "\\pipe\\test", NULL, &tower); - ok(ret == RPC_S_OK, "TowerConstruct failed with error %ld\n", ret); + ok(ret == RPC_S_OK, "TowerConstruct failed with error %d\n", ret); ret = TowerExplode(tower, NULL, NULL, NULL, NULL, &address); ok(ret == RPC_S_OK || broken(ret != RPC_S_OK), /* win2k, indeterminate */ - "TowerExplode failed with error %ld\n", ret); + "TowerExplode failed with error %d\n", ret); /* Windows XP SP3 sets address to NULL */ ok(!address || !strcmp(address, ""), "address was \"%s\" instead of \"\" or NULL (XP SP3)\n", address); @@ -556,7 +556,7 @@ static void test_I_RpcMapWin32Status(void) ok(win32status == expected_win32status || broken(missing && win32status == rpc_status), - "I_RpcMapWin32Status(%ld) should have returned 0x%x instead of 0x%x%s\n", + "I_RpcMapWin32Status(%d) should have returned 0x%x instead of 0x%x%s\n", rpc_status, expected_win32status, win32status, broken(missing) ? " (or have returned with the given status)" : ""); } @@ -578,7 +578,7 @@ static void test_RpcStringBindingParseA(void) /* test all parameters */ status = RpcStringBindingParseA(valid_binding, &uuid, &protseq, &network_addr, &endpoint, &options); - ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %ld\n", status); + ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %d\n", status); ok(!strcmp((char *)uuid, "00000000-0000-0000-c000-000000000046"), "uuid should have been 00000000-0000-0000-C000-000000000046 instead of %s\n", uuid); ok(!strcmp((char *)protseq, "ncacn_np"), "protseq should have been ncacn_np instead of %s\n", protseq); ok(!strcmp((char *)network_addr, "."), "network_addr should have been . instead of %s\n", network_addr); @@ -593,7 +593,7 @@ static void test_RpcStringBindingParseA(void) /* test all parameters with different type of string binding */ status = RpcStringBindingParseA(valid_binding2, &uuid, &protseq, &network_addr, &endpoint, &options); - ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %ld\n", status); + ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %d\n", status); ok(!strcmp((char *)uuid, "00000000-0000-0000-c000-000000000046"), "uuid should have been 00000000-0000-0000-C000-000000000046 instead of %s\n", uuid); ok(!strcmp((char *)protseq, "ncacn_np"), "protseq should have been ncacn_np instead of %s\n", protseq); ok(!strcmp((char *)network_addr, "."), "network_addr should have been . instead of %s\n", network_addr); @@ -608,24 +608,24 @@ static void test_RpcStringBindingParseA(void) /* test with as many parameters NULL as possible */ status = RpcStringBindingParseA(valid_binding, NULL, &protseq, NULL, NULL, NULL); - ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %ld\n", status); + ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %d\n", status); ok(!strcmp((char *)protseq, "ncacn_np"), "protseq should have been ncacn_np instead of %s\n", protseq); RpcStringFreeA(&protseq); /* test with invalid uuid */ status = RpcStringBindingParseA(invalid_uuid_binding, NULL, &protseq, NULL, NULL, NULL); - ok(status == RPC_S_INVALID_STRING_UUID, "RpcStringBindingParseA should have returned RPC_S_INVALID_STRING_UUID instead of %ld\n", status); + ok(status == RPC_S_INVALID_STRING_UUID, "RpcStringBindingParseA should have returned RPC_S_INVALID_STRING_UUID instead of %d\n", status); ok(protseq == NULL, "protseq was %p instead of NULL\n", protseq); /* test with invalid endpoint */ status = RpcStringBindingParseA(invalid_ep_binding, NULL, &protseq, NULL, NULL, NULL); - ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %ld\n", status); + ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %d\n", status); RpcStringFreeA(&protseq); /* test with invalid binding */ status = RpcStringBindingParseA(invalid_binding, &uuid, &protseq, &network_addr, &endpoint, &options); todo_wine - ok(status == RPC_S_INVALID_STRING_BINDING, "RpcStringBindingParseA should have returned RPC_S_INVALID_STRING_BINDING instead of %ld\n", status); + ok(status == RPC_S_INVALID_STRING_BINDING, "RpcStringBindingParseA should have returned RPC_S_INVALID_STRING_BINDING instead of %d\n", status); todo_wine ok(uuid == NULL, "uuid was %p instead of NULL\n", uuid); ok(protseq == NULL, "protseq was %p instead of NULL\n", protseq); @@ -691,49 +691,49 @@ static void test_endpoint_mapper(RPC_CSTR protseq, RPC_CSTR address, status = RpcServerUseProtseqEp(protseq, 20, endpoint, NULL); ok(status == RPC_S_OK || broken(status == RPC_S_PROTSEQ_NOT_SUPPORTED), /* win9x */ - "%s: RpcServerUseProtseqEp failed (%lu)\n", protseq, status); + "%s: RpcServerUseProtseqEp failed (%u)\n", protseq, status); status = RpcServerRegisterIf(IFoo_v0_0_s_ifspec, NULL, NULL); - ok(status == RPC_S_OK, "%s: RpcServerRegisterIf failed (%lu)\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcServerRegisterIf failed (%u)\n", protseq, status); status = RpcServerInqBindings(&binding_vector); - ok(status == RPC_S_OK, "%s: RpcServerInqBindings failed with error %lu\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcServerInqBindings failed with error %u\n", protseq, status); status = RpcEpRegisterA(IFoo_v0_0_s_ifspec, binding_vector, NULL, annotation); - ok(status == RPC_S_OK, "%s: RpcEpRegisterA failed with error %lu\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcEpRegisterA failed with error %u\n", protseq, status); status = RpcStringBindingCompose(NULL, protseq, address, NULL, NULL, &binding); - ok(status == RPC_S_OK, "%s: RpcStringBindingCompose failed (%lu)\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcStringBindingCompose failed (%u)\n", protseq, status); status = RpcBindingFromStringBinding(binding, &handle); - ok(status == RPC_S_OK, "%s: RpcBindingFromStringBinding failed (%lu)\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcBindingFromStringBinding failed (%u)\n", protseq, status); RpcStringFree(&binding); status = RpcBindingReset(handle); - ok(status == RPC_S_OK, "%s: RpcBindingReset failed with error %lu\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcBindingReset failed with error %u\n", protseq, status); RpcStringFree(&binding); status = RpcEpResolveBinding(handle, IFoo_v0_0_s_ifspec); ok(status == RPC_S_OK || broken(status == RPC_S_SERVER_UNAVAILABLE), /* win9x */ - "%s: RpcEpResolveBinding failed with error %lu\n", protseq, status); + "%s: RpcEpResolveBinding failed with error %u\n", protseq, status); status = RpcBindingReset(handle); - ok(status == RPC_S_OK, "%s: RpcBindingReset failed with error %lu\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcBindingReset failed with error %u\n", protseq, status); status = RpcBindingFree(&handle); - ok(status == RPC_S_OK, "%s: RpcBindingFree failed with error %lu\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcBindingFree failed with error %u\n", protseq, status); status = RpcServerUnregisterIf(NULL, NULL, FALSE); - ok(status == RPC_S_OK, "%s: RpcServerUnregisterIf failed (%lu)\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcServerUnregisterIf failed (%u)\n", protseq, status); status = RpcEpUnregister(IFoo_v0_0_s_ifspec, binding_vector, NULL); - ok(status == RPC_S_OK, "%s: RpcEpUnregisterA failed with error %lu\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcEpUnregisterA failed with error %u\n", protseq, status); status = RpcBindingVectorFree(&binding_vector); - ok(status == RPC_S_OK, "%s: RpcBindingVectorFree failed with error %lu\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcBindingVectorFree failed with error %u\n", protseq, status); } static void test_RpcStringBindingFromBinding(void) @@ -747,21 +747,21 @@ static void test_RpcStringBindingFromBinding(void) status = RpcStringBindingCompose(NULL, ncacn_np, address, endpoint, NULL, &binding); - ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%u)\n", status); status = RpcBindingFromStringBinding(binding, &handle); - ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%u)\n", status); RpcStringFree(&binding); status = RpcBindingToStringBinding(handle, &binding); - ok(status == RPC_S_OK, "RpcStringBindingFromBinding failed with error %lu\n", status); + ok(status == RPC_S_OK, "RpcStringBindingFromBinding failed with error %u\n", status); ok(!strcmp((const char *)binding, "ncacn_np:.[\\\\pipe\\\\wine_rpc_test]"), "binding string didn't match what was expected: \"%s\"\n", binding); RpcStringFree(&binding); status = RpcBindingFree(&handle); - ok(status == RPC_S_OK, "RpcBindingFree failed with error %lu\n", status); + ok(status == RPC_S_OK, "RpcBindingFree failed with error %u\n", status); } static char *printGuid(char *buf, const UUID *guid) diff --git a/dlls/rpcrt4/tests/rpc_async.c b/dlls/rpcrt4/tests/rpc_async.c index 0cc5557ce06..a540b907b1d 100644 --- a/dlls/rpcrt4/tests/rpc_async.c +++ b/dlls/rpcrt4/tests/rpc_async.c @@ -36,14 +36,14 @@ static void test_RpcAsyncInitializeHandle(void) int i; status = pRpcAsyncInitializeHandle((PRPC_ASYNC_STATE)buffer, sizeof(buffer)); - ok(status == ERROR_INVALID_PARAMETER, "RpcAsyncInitializeHandle with large Size should have returned ERROR_INVALID_PARAMETER instead of %ld\n", status); + ok(status == ERROR_INVALID_PARAMETER, "RpcAsyncInitializeHandle with large Size should have returned ERROR_INVALID_PARAMETER instead of %d\n", status); status = pRpcAsyncInitializeHandle(&async, sizeof(async) - 1); - ok(status == ERROR_INVALID_PARAMETER, "RpcAsyncInitializeHandle with small Size should have returned ERROR_INVALID_PARAMETER instead of %ld\n", status); + ok(status == ERROR_INVALID_PARAMETER, "RpcAsyncInitializeHandle with small Size should have returned ERROR_INVALID_PARAMETER instead of %d\n", status); memset(&async, 0xcc, sizeof(async)); status = pRpcAsyncInitializeHandle(&async, sizeof(async)); - ok(status == RPC_S_OK, "RpcAsyncInitializeHandle failed with error %ld\n", status); + ok(status == RPC_S_OK, "RpcAsyncInitializeHandle failed with error %d\n", status); ok(async.Size == sizeof(async), "async.Size wrong: %d\n", async.Size); ok(async.Signature == 0x43595341, "async.Signature should be 0x43595341, but is 0x%x instead\n", async.Signature); @@ -64,16 +64,16 @@ static void test_RpcAsyncGetCallStatus(void) RPC_STATUS status; status = pRpcAsyncInitializeHandle(&async, sizeof(async)); - ok(status == RPC_S_OK, "RpcAsyncInitializeHandle failed with error %ld\n", status); + ok(status == RPC_S_OK, "RpcAsyncInitializeHandle failed with error %d\n", status); status = pRpcAsyncGetCallStatus(&async); todo_wine - ok(status == RPC_S_INVALID_BINDING, "RpcAsyncGetCallStatus should have returned RPC_S_INVALID_BINDING instead of %ld\n", status); + ok(status == RPC_S_INVALID_BINDING, "RpcAsyncGetCallStatus should have returned RPC_S_INVALID_BINDING instead of %d\n", status); memset(&async, 0, sizeof(async)); status = pRpcAsyncGetCallStatus(&async); todo_wine - ok(status == RPC_S_INVALID_BINDING, "RpcAsyncGetCallStatus should have returned RPC_S_INVALID_BINDING instead of %ld\n", status); + ok(status == RPC_S_INVALID_BINDING, "RpcAsyncGetCallStatus should have returned RPC_S_INVALID_BINDING instead of %d\n", status); } START_TEST( rpc_async ) diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c index ed4fef94b27..df0cdfd3a85 100644 --- a/dlls/rpcrt4/tests/server.c +++ b/dlls/rpcrt4/tests/server.c @@ -1294,12 +1294,12 @@ server(void) DWORD ret; iptcp_status = RpcServerUseProtseqEp(iptcp, 20, port, NULL); - ok(iptcp_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_ip_tcp) failed with status %ld\n", iptcp_status); + ok(iptcp_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_ip_tcp) failed with status %d\n", iptcp_status); np_status = RpcServerUseProtseqEp(np, 0, pipe, NULL); if (np_status == RPC_S_PROTSEQ_NOT_SUPPORTED) skip("Protocol sequence ncacn_np is not supported\n"); else - ok(np_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_np) failed with status %ld\n", np_status); + ok(np_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_np) failed with status %d\n", np_status); if (pRpcServerRegisterIfEx) { @@ -1310,9 +1310,9 @@ server(void) } else status = RpcServerRegisterIf(s_IServer_v0_0_s_ifspec, NULL, NULL); - ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %ld\n", status); + ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %d\n", status); status = RpcServerListen(1, 20, TRUE); - ok(status == RPC_S_OK, "RpcServerListen failed with status %ld\n", status); + ok(status == RPC_S_OK, "RpcServerListen failed with status %d\n", status); stop_event = CreateEvent(NULL, FALSE, FALSE, NULL); ok(stop_event != NULL, "CreateEvent failed with error %d\n", GetLastError()); @@ -1338,7 +1338,7 @@ server(void) { status = RpcMgmtWaitServerListen(); todo_wine { - ok(status == RPC_S_OK, "RpcMgmtWaitServerListening failed with status %ld\n", status); + ok(status == RPC_S_OK, "RpcMgmtWaitServerListening failed with status %d\n", status); } } } diff --git a/include/rpc.h b/include/rpc.h index 6c92ecce084..3e7e1293696 100644 --- a/include/rpc.h +++ b/include/rpc.h @@ -51,7 +51,7 @@ #define __RPC_STUB __stdcall #define RPC_ENTRY __stdcall #define RPCRTAPI -typedef long RPC_STATUS; +typedef LONG RPC_STATUS; typedef void* I_RPC_HANDLE; diff --git a/programs/rpcss/epmp.c b/programs/rpcss/epmp.c index d7712b9f4ea..e9cb5e95e5f 100644 --- a/programs/rpcss/epmp.c +++ b/programs/rpcss/epmp.c @@ -120,7 +120,7 @@ void ept_insert(handle_t h, &entry->address); if (rpc_status != RPC_S_OK) { - WINE_WARN("TowerExplode failed %lu\n", rpc_status); + WINE_WARN("TowerExplode failed %u\n", rpc_status); *status = rpc_status; break; /* FIXME: more cleanup? */ }