private static void ServerUseProtseqEp(RpcProtseq protocol, uint maxCalls, String endpoint)
        {
            Log.Verbose("ServerUseProtseqEp({0})", protocol);
            RpcError err = RpcServerUseProtseqEp(protocol.ToString(), maxCalls, endpoint, IntPtr.Zero);

            if (err != RpcError.RPC_S_DUPLICATE_ENDPOINT)
            {
                RpcException.Assert(err);
            }
        }
Ejemplo n.º 2
0
        private static bool ServerUseProtseqEp(RpcProtseq protocol, int maxCalls, string endpoint)
        {
            RpcError errorCode = RpcServerApi.RpcServerUseProtseqEp(protocol.ToString(), maxCalls, endpoint, IntPtr.Zero);

            if (errorCode != RpcError.RPC_S_DUPLICATE_ENDPOINT)
            {
                RpcException.Assert(errorCode);
            }

            return(errorCode == RpcError.RPC_S_OK);
        }
Ejemplo n.º 3
0
        private static string StringBindingCompose(RpcProtseq ProtSeq, string NetworkAddr, string Endpoint, string Options)
        {
            IntPtr lpBindingString;

            RpcException.Assert(RpcClientApi.RpcStringBindingCompose((string)null, ProtSeq.ToString(), NetworkAddr, Endpoint, Options, out lpBindingString));
            try
            {
                return(Marshal.PtrToStringUni(lpBindingString));
            }
            finally
            {
                RpcException.Assert(RpcClientApi.RpcStringFree(ref lpBindingString));
            }
        }
Ejemplo n.º 4
0
        private static bool serverUseProtseqEp(RpcProtseq protocol, int maxCalls, String endpoint)
        {
            RpcTrace.Verbose("serverUseProtseqEp({0})", protocol);
            // all RPC servers within the process will be available on that protocol
            // once invoked this can not be undone
            //TODO: make server isolated of other process services, make it not static as possible
            RPC_STATUS err = NativeMethods.RpcServerUseProtseqEp(protocol.ToString(), maxCalls, endpoint, IntPtr.Zero);

            if (err != RPC_STATUS.RPC_S_DUPLICATE_ENDPOINT)
            {
                Guard.Assert(err);
            }
            return(err == RPC_STATUS.RPC_S_OK);
        }
Ejemplo n.º 5
0
        private static String StringBindingCompose(RpcProtseq ProtSeq, String NetworkAddr, String Endpoint,
                                                   String Options)
        {
            IntPtr   lpBindingString;
            RpcError result = RpcStringBindingCompose(null, ProtSeq.ToString(), NetworkAddr, Endpoint, Options,
                                                      out lpBindingString);

            RpcException.Assert(result);

            try
            {
                return(Marshal.PtrToStringUni(lpBindingString));
            }
            finally
            {
                RpcException.Assert(RpcStringFree(ref lpBindingString));
            }
        }
        private static bool ServerUseProtseqEp(RpcProtseq protocol, int maxCalls, String endpoint)
        {
            Log.Verbose("ServerUseProtseqEp({0})", protocol);
            RpcError err = RpcServerUseProtseqEp(protocol.ToString(), maxCalls, endpoint, IntPtr.Zero);
            if (err != RpcError.RPC_S_DUPLICATE_ENDPOINT)
                RpcException.Assert(err);

            return err == RpcError.RPC_S_OK;
        }
        private static String StringBindingCompose(RpcProtseq ProtSeq, String NetworkAddr, String Endpoint,
                                                   String Options)
        {
            IntPtr lpBindingString;
            RpcError result = RpcStringBindingCompose(null, ProtSeq.ToString(), NetworkAddr, Endpoint, Options,
                                                      out lpBindingString);
            RpcException.Assert(result);

            try
            {
                return Marshal.PtrToStringUni(lpBindingString);
            }
            finally
            {
                RpcException.Assert(RpcStringFree(ref lpBindingString));
            }
        }
Ejemplo n.º 8
0
 private static bool serverUseProtseqEp(RpcProtseq protocol, int maxCalls, String endpoint)
 {
     RpcTrace.Verbose("serverUseProtseqEp({0})", protocol);
     // all RPC servers within the process will be available on that protocol
     // once invoked this can not be undone
     //TODO: make server isolated of other process services, make it not static as possible
     RPC_STATUS err = NativeMethods.RpcServerUseProtseqEp(protocol.ToString(), maxCalls, endpoint, IntPtr.Zero);
     if (err != RPC_STATUS.RPC_S_DUPLICATE_ENDPOINT)
         Guard.Assert(err);
     return err == RPC_STATUS.RPC_S_OK;
 }