windows-no-more-rpcns4-dll-20080212
authorJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 12 Feb 2008 13:29:36 +0000 (13:29 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 12 Feb 2008 13:29:36 +0000 (13:29 +0000)
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
src/WINNT/afsadmsvr/TaAfsAdmSvrClientBind.cpp
src/WINNT/afsadmsvr/TaAfsAdmSvrMain.cpp
src/WINNT/afsapplib/NTMakefile
src/WINNT/client_osi/NTMakefile

index 242fbda..ed5377f 100644 (file)
@@ -76,7 +76,7 @@ EXEOBJS = \
 VCLIBS =\
        gdi32.lib \
        user32.lib \
-       rpcns4.lib \
+#      rpcns4.lib \
        rpcrt4.lib \
        comctl32.lib \
        gdi32.lib
index 18e9182..c003ebd 100644 (file)
@@ -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.)
       //
index 0dfc8b9..31f752e 100644 (file)
@@ -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);
index 56b6ba3..737ddb5 100644 (file)
@@ -76,7 +76,7 @@ DLLOBJS = \
 VCLIBS =\
        comctl32.lib \
        rpcrt4.lib \
-       rpcns4.lib \
+#      rpcns4.lib \
 
 DLLLIBS = \
        $(DESTDIR)\lib\afs\TaAfsAdmSvrClient.lib \
index efc3dcd..0e8d079 100644 (file)
@@ -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