From 5021965d2ec15cc05c838571253997fa582e762b Mon Sep 17 00:00:00 2001 From: Paul Vriens Date: Mon, 15 Dec 2008 15:06:37 +0100 Subject: [PATCH] rpcrt4/tests: Move function pointer initialization to the init function. --- dlls/rpcrt4/tests/server.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c index a2d72de90f..ed4fef94b2 100644 --- a/dlls/rpcrt4/tests/server.c +++ b/dlls/rpcrt4/tests/server.c @@ -38,6 +38,8 @@ static HANDLE stop_event; static void (WINAPI *pNDRSContextMarshall2)(RPC_BINDING_HANDLE, NDR_SCONTEXT, void*, NDR_RUNDOWN, void*, ULONG); static NDR_SCONTEXT (WINAPI *pNDRSContextUnmarshall2)(RPC_BINDING_HANDLE, void*, ULONG, void*, ULONG); +static RPC_STATUS (WINAPI *pRpcServerRegisterIfEx)(RPC_IF_HANDLE,UUID*, RPC_MGR_EPV*, unsigned int, + unsigned int,RPC_IF_CALLBACK_FN*); static void InitFunctionPointers(void) { @@ -45,6 +47,7 @@ static void InitFunctionPointers(void) pNDRSContextMarshall2 = (void *)GetProcAddress(hrpcrt4, "NDRSContextMarshall2"); pNDRSContextUnmarshall2 = (void *)GetProcAddress(hrpcrt4, "NDRSContextUnmarshall2"); + pRpcServerRegisterIfEx = (void *)GetProcAddress(hrpcrt4, "RpcServerRegisterIfEx"); } void __RPC_FAR *__RPC_USER @@ -1288,8 +1291,6 @@ server(void) static unsigned char np[] = "ncacn_np"; static unsigned char pipe[] = PIPE; RPC_STATUS status, iptcp_status, np_status; - RPC_STATUS (RPC_ENTRY *pRpcServerRegisterIfEx)(RPC_IF_HANDLE,UUID*, - RPC_MGR_EPV*, unsigned int,unsigned int,RPC_IF_CALLBACK_FN*); DWORD ret; iptcp_status = RpcServerUseProtseqEp(iptcp, 20, port, NULL); @@ -1300,7 +1301,6 @@ server(void) else ok(np_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_np) failed with status %ld\n", np_status); - pRpcServerRegisterIfEx = (void *)GetProcAddress(GetModuleHandle("rpcrt4.dll"), "RpcServerRegisterIfEx"); if (pRpcServerRegisterIfEx) { trace("Using RpcServerRegisterIfEx\n");