Beispiel #1
0
 public RPCClient(string ipAddress, string strEndPoint, ProtocolSequenceType protocolSequence,
                  AuthenticationLevelType authenticationLevelType,
                  SecurityProviderType securityProviderType,
                  string userName, string password)
 {
     if (protocolSequence == ProtocolSequenceType.ncacn_np)
     {
         RPCWorker = new RPCWorker(ipAddress, strEndPoint, userName, password);
     }
     else if (protocolSequence == ProtocolSequenceType.ncacn_ip_tcp)
     {
         RPCWorker = new RPCWorker(ipAddress, int.Parse(strEndPoint), userName, password, authenticationLevelType, securityProviderType);
     }
     else
     {
         throw new Exception("no Support ProtocolSequenceType");
     }
     if (authenticationLevelType != AuthenticationLevelType.NONE && authenticationLevelType != AuthenticationLevelType.CONNECT && authenticationLevelType != AuthenticationLevelType.PKT)
     {
         throw new Exception("no Support authenticationLevelType");
     }
     if (securityProviderType != SecurityProviderType.NONE && securityProviderType != SecurityProviderType.WINNT)
     {
         throw new Exception("no Support SecurityProviderType");
     }
 }
Beispiel #2
0
 internal RpcBind(RPCWorker rpcWorker, ushort contextId)
 {
     RPCWorker = rpcWorker;
     ContextId = contextId;
 }