From a5e5736c67cdf3d08bce548447bc7635b65329c2 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Tue, 12 Feb 2008 13:29:36 +0000 Subject: [PATCH] windows-no-more-rpcns4-dll-20080212 LICENSE MIT Remove all references to rpcns4.lib and its included functions RpcNsXXX. These APIs are no longer supported on Vista. Except for TaAfsAdmSvr they had been commented out for a long time but we still continued to link to the library. Loading the library generates a no longer supported error on Vista. So lets get rid of it. --- src/WINNT/afsadmsvr/NTMakefile | 2 +- src/WINNT/afsadmsvr/TaAfsAdmSvrClientBind.cpp | 3 ++- src/WINNT/afsadmsvr/TaAfsAdmSvrMain.cpp | 7 ++++++- src/WINNT/afsapplib/NTMakefile | 2 +- src/WINNT/client_osi/NTMakefile | 5 +++-- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/WINNT/afsadmsvr/NTMakefile b/src/WINNT/afsadmsvr/NTMakefile index 242fbda1d..ed5377f15 100644 --- a/src/WINNT/afsadmsvr/NTMakefile +++ b/src/WINNT/afsadmsvr/NTMakefile @@ -76,7 +76,7 @@ EXEOBJS = \ VCLIBS =\ gdi32.lib \ user32.lib \ - rpcns4.lib \ +# rpcns4.lib \ rpcrt4.lib \ comctl32.lib \ gdi32.lib diff --git a/src/WINNT/afsadmsvr/TaAfsAdmSvrClientBind.cpp b/src/WINNT/afsadmsvr/TaAfsAdmSvrClientBind.cpp index 18e918274..c003ebd92 100644 --- a/src/WINNT/afsadmsvr/TaAfsAdmSvrClientBind.cpp +++ b/src/WINNT/afsadmsvr/TaAfsAdmSvrClientBind.cpp @@ -55,6 +55,7 @@ BOOL ADMINAPI BindToAdminServer (LPCTSTR pszAddress, BOOL fWait, UINT_PTR *pidCl for (DWORD dwTickStart = GetTickCount(); ; ) { +#ifdef notdef // First we'll enumerate the name services around here to see if // an admin server is already running. // @@ -72,7 +73,7 @@ BOOL ADMINAPI BindToAdminServer (LPCTSTR pszAddress, BOOL fWait, UINT_PTR *pidCl else if (status != RPC_S_CALL_FAILED_DNE) // server rejected us! break; } - +#endif // Failing that, we'll try to bind to the well-known endpoint that the // admin server may have had to use. (if RpcNsBindingExport failed.) // diff --git a/src/WINNT/afsadmsvr/TaAfsAdmSvrMain.cpp b/src/WINNT/afsadmsvr/TaAfsAdmSvrMain.cpp index 0dfc8b901..31f752e8c 100644 --- a/src/WINNT/afsadmsvr/TaAfsAdmSvrMain.cpp +++ b/src/WINNT/afsadmsvr/TaAfsAdmSvrMain.cpp @@ -83,7 +83,9 @@ int cdecl main (int argc, char **argv) // Clean up any broken interface registration // RpcServerUnregisterIf (ITaAfsAdminSvr_v1_0_s_ifspec, 0, FALSE); +#ifdef notdef RpcNsBindingUnexport (RPC_C_NS_SYNTAX_DEFAULT, pszENTRYNAME, ITaAfsAdminSvr_v1_0_s_ifspec, NULL); +#endif // Register our interface // @@ -121,10 +123,12 @@ int cdecl main (int argc, char **argv) { BOOL fExportedBinding = FALSE; +#ifdef notdef if ((status = RpcNsBindingExport (RPC_C_NS_SYNTAX_DEFAULT, pszENTRYNAME, ITaAfsAdminSvr_v1_0_s_ifspec, pBindingVector, NULL)) == 0) fExportedBinding = TRUE; else Print (dlWARNING, TEXT("RpcNsBindingExport failed (benign); error 0x%08lX"), status); +#endif if (!fExportedBinding && !fGotPort) { @@ -160,6 +164,7 @@ int cdecl main (int argc, char **argv) AfsAdmSvr_Shutdown(); } +#ifdef notdef if (fExportedBinding) { if ((status = RpcNsBindingUnexport (RPC_C_NS_SYNTAX_DEFAULT, pszENTRYNAME, ITaAfsAdminSvr_v1_0_s_ifspec, NULL)) != 0) @@ -167,7 +172,7 @@ int cdecl main (int argc, char **argv) Print (dlWARNING, TEXT("RpcNsBindingExport failed; error 0x%08lX"), status); } } - +#endif if ((status = RpcEpUnregister (ITaAfsAdminSvr_v1_0_s_ifspec, pBindingVector, NULL)) != 0) { Print (dlWARNING, TEXT("RpcEpUnregister failed; error 0x%08lX"), status); diff --git a/src/WINNT/afsapplib/NTMakefile b/src/WINNT/afsapplib/NTMakefile index 56b6ba3f7..737ddb5ed 100644 --- a/src/WINNT/afsapplib/NTMakefile +++ b/src/WINNT/afsapplib/NTMakefile @@ -76,7 +76,7 @@ DLLOBJS = \ VCLIBS =\ comctl32.lib \ rpcrt4.lib \ - rpcns4.lib \ +# rpcns4.lib \ DLLLIBS = \ $(DESTDIR)\lib\afs\TaAfsAdmSvrClient.lib \ diff --git a/src/WINNT/client_osi/NTMakefile b/src/WINNT/client_osi/NTMakefile index efc3dcd95..0e8d07917 100644 --- a/src/WINNT/client_osi/NTMakefile +++ b/src/WINNT/client_osi/NTMakefile @@ -45,7 +45,8 @@ EXEOBJS = \ osidebug.obj EXELIBS = \ - rpcrt4.lib rpcns4.lib \ + rpcrt4.lib \ +# rpcns4.lib \ Ws2_32.lib shell32.lib \ $(DESTDIR)\lib\libosi.lib @@ -71,7 +72,7 @@ DLLOBJS =\ DLLLIBS =\ rpcrt4.lib \ - rpcns4.lib +# rpcns4.lib $(DLLFILE): $(DLLOBJS) $(DLLGUILINK) $(DLLLIBS) -def:libosi.def -- 2.39.5