rpcrt4: Add RpcExceptionFilter implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d6c94be74d
commit
8a48621fc9
|
@ -42,7 +42,7 @@
|
|||
@ stub I_RpcConnectionSetSockBuffSize
|
||||
@ stub I_RpcDeleteMutex
|
||||
@ stub I_RpcEnableWmiTrace # wxp
|
||||
@ stdcall I_RpcExceptionFilter(long)
|
||||
@ stdcall I_RpcExceptionFilter(long) RpcExceptionFilter
|
||||
@ stdcall I_RpcFree(ptr)
|
||||
@ stdcall I_RpcFreeBuffer(ptr)
|
||||
@ stub I_RpcFreePipeBuffer
|
||||
|
@ -383,6 +383,7 @@
|
|||
@ stub RpcErrorResetEnumeration # wxp
|
||||
@ stdcall RpcErrorSaveErrorInfo(ptr ptr ptr)
|
||||
@ stdcall RpcErrorStartEnumeration(ptr)
|
||||
@ stdcall RpcExceptionFilter(long)
|
||||
@ stub RpcFreeAuthorizationContext # wxp
|
||||
@ stdcall RpcGetAsyncCallStatus(ptr) RpcAsyncGetCallStatus
|
||||
@ stub RpcIfIdVectorFree
|
||||
|
|
|
@ -854,9 +854,10 @@ LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
|
|||
}
|
||||
|
||||
/******************************************************************************
|
||||
* RpcExceptionFilter (rpcrt4.@)
|
||||
* I_RpcExceptionFilter (rpcrt4.@)
|
||||
*/
|
||||
int WINAPI I_RpcExceptionFilter(ULONG ExceptionCode)
|
||||
int WINAPI RpcExceptionFilter(ULONG ExceptionCode)
|
||||
{
|
||||
TRACE("0x%x\n", ExceptionCode);
|
||||
switch (ExceptionCode)
|
||||
|
|
|
@ -649,15 +649,15 @@ static void test_RpcStringBindingParseA(void)
|
|||
ok(options == NULL, "options was %p instead of NULL\n", options);
|
||||
}
|
||||
|
||||
static void test_I_RpcExceptionFilter(void)
|
||||
static void test_RpcExceptionFilter(const char *func_name)
|
||||
{
|
||||
ULONG exception;
|
||||
int retval;
|
||||
int (WINAPI *pI_RpcExceptionFilter)(ULONG) = (void *)GetProcAddress(GetModuleHandleA("rpcrt4.dll"), "I_RpcExceptionFilter");
|
||||
int (WINAPI *pRpcExceptionFilter)(ULONG) = (void *)GetProcAddress(GetModuleHandleA("rpcrt4.dll"), func_name);
|
||||
|
||||
if (!pI_RpcExceptionFilter)
|
||||
if (!pRpcExceptionFilter)
|
||||
{
|
||||
win_skip("I_RpcExceptionFilter not exported\n");
|
||||
win_skip("%s not exported\n", func_name);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -668,7 +668,7 @@ static void test_I_RpcExceptionFilter(void)
|
|||
if (exception == 0x40000005) exception = 0x80000000;
|
||||
if (exception == 0x80000005) exception = 0xc0000000;
|
||||
|
||||
retval = pI_RpcExceptionFilter(exception);
|
||||
retval = pRpcExceptionFilter(exception);
|
||||
switch (exception)
|
||||
{
|
||||
case STATUS_DATATYPE_MISALIGNMENT:
|
||||
|
@ -679,17 +679,17 @@ static void test_I_RpcExceptionFilter(void)
|
|||
case STATUS_INSTRUCTION_MISALIGNMENT:
|
||||
case STATUS_STACK_OVERFLOW:
|
||||
case STATUS_POSSIBLE_DEADLOCK:
|
||||
ok(retval == EXCEPTION_CONTINUE_SEARCH, "I_RpcExceptionFilter(0x%x) should have returned %d instead of %d\n",
|
||||
exception, EXCEPTION_CONTINUE_SEARCH, retval);
|
||||
ok(retval == EXCEPTION_CONTINUE_SEARCH, "%s(0x%x) should have returned %d instead of %d\n",
|
||||
func_name, exception, EXCEPTION_CONTINUE_SEARCH, retval);
|
||||
break;
|
||||
case STATUS_GUARD_PAGE_VIOLATION:
|
||||
case STATUS_IN_PAGE_ERROR:
|
||||
case STATUS_HANDLE_NOT_CLOSABLE:
|
||||
trace("I_RpcExceptionFilter(0x%x) returned %d\n", exception, retval);
|
||||
trace("%s(0x%x) returned %d\n", func_name, exception, retval);
|
||||
break;
|
||||
default:
|
||||
ok(retval == EXCEPTION_EXECUTE_HANDLER, "I_RpcExceptionFilter(0x%x) should have returned %d instead of %d\n",
|
||||
exception, EXCEPTION_EXECUTE_HANDLER, retval);
|
||||
ok(retval == EXCEPTION_EXECUTE_HANDLER, "%s(0x%x) should have returned %d instead of %d\n",
|
||||
func_name, exception, EXCEPTION_EXECUTE_HANDLER, retval);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1198,7 +1198,8 @@ START_TEST( rpc )
|
|||
test_towers();
|
||||
test_I_RpcMapWin32Status();
|
||||
test_RpcStringBindingParseA();
|
||||
test_I_RpcExceptionFilter();
|
||||
test_RpcExceptionFilter("I_RpcExceptionFilter");
|
||||
test_RpcExceptionFilter("RpcExceptionFilter");
|
||||
test_RpcStringBindingFromBinding();
|
||||
test_UuidCreate();
|
||||
test_UuidCreateSequential();
|
||||
|
|
|
@ -325,6 +325,8 @@ RPC_STATUS RPC_ENTRY DceErrorInqTextW(RPC_STATUS e, RPC_WSTR buffer);
|
|||
RPCRTAPI DECLSPEC_NORETURN void RPC_ENTRY
|
||||
RpcRaiseException( RPC_STATUS exception );
|
||||
|
||||
RPCRTAPI int RPC_ENTRY RpcExceptionFilter(ULONG);
|
||||
|
||||
RPCRTAPI RPC_STATUS RPC_ENTRY
|
||||
RpcBindingCopy( RPC_BINDING_HANDLE SourceBinding, RPC_BINDING_HANDLE* DestinationBinding );
|
||||
|
||||
|
|
Loading…
Reference in New Issue