include: Change RPC_STATUS from long to LONG for Win64 compatibility.

Also fix the compiler warnings introduced by this change.
This commit is contained in:
Michael Stefaniuc 2009-01-04 01:49:14 +01:00 committed by Alexandre Julliard
parent 969ef6d3b5
commit e86eb8efa6
15 changed files with 85 additions and 85 deletions

View File

@ -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)
{

View File

@ -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(&registered_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);
}

View File

@ -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));*/

View File

@ -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)
{

View File

@ -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;
}

View File

@ -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]);
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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);
}
}

View File

@ -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)

View File

@ -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 )

View File

@ -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);
}
}
}

View File

@ -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;

View File

@ -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? */
}