Пример #1
0
 /// <summary>
 ///Constructor, initialize a Samr server.<para/>
 /// Create the instance will not listen for RPC calls,
 /// you should call StartTcp or StartNamedPipe
 /// to actually listen for RPC calls.
 /// </summary>
 /// <param name="rpceServer">the rpce transport that already set securityContextCreator and
 /// you intend to use as transport of your samr server</param>
 public SamrServer(RpceServerTransport rpceServer)
 {
     contextManager  = new SamrContextManager();
     rpceLayerServer = rpceServer;
     rpceLayerServer.RegisterInterface(
         SamrUtility.SAMR_RPC_INTERFACE_UUID,
         SamrUtility.SAMR_RPC_INTERFACE_MAJOR_VERSION,
         SamrUtility.SAMR_RPC_INTERFACE_MINOR_VERSION);
 }
Пример #2
0
 /// <summary>
 /// Constructor, initialize a Samr server.<para/>
 /// Create the instance will not listen for RPC calls,
 /// you should call StartTcp or StartNamedPipe
 /// to actually listen for RPC calls.
 /// </summary>
 /// <param name="securityContextCreator">Server security creator</param>
 public SamrServer(RpceSecurityContextCreatingEventHandler securityContextCreator)
 {
     contextManager  = new SamrContextManager();
     rpceLayerServer = new RpceServerTransport();
     rpceLayerServer.RegisterInterface(
         SamrUtility.SAMR_RPC_INTERFACE_UUID,
         SamrUtility.SAMR_RPC_INTERFACE_MAJOR_VERSION,
         SamrUtility.SAMR_RPC_INTERFACE_MINOR_VERSION);
     this.rpceLayerServer.SetSecurityContextCreator(securityContextCreator);
 }