/// <summary> /// /// </summary> /// <param name="inName"></param> /// <param name="inServerCapacity"></param> /// <param name="inClientCapacity"></param> public virtual bool Init(IntPtr inHandle, string inName, Int64 inServerCapacity, Int64 inClientCapacity) { bool result = true; //:::::::::::::::::::::::::::::::::::::::::::: if (_sharedMemoryController == null) { try { _sharedMemoryController = createSharedMemoryController(inName, inServerCapacity, inClientCapacity); if (_sharedMemoryController != null) { publishHWNDHandle(inHandle); _active = true; } else { result = false; } } catch { result = false; } } //:::::::::::::::::::::::::::::::::::::::::::: return(result); }
/// <summary> /// /// </summary> protected void initMemController() { server_has_reset = false; order_seq_no = 0; SharedMemControllerBuilder smc_builder = SharedMemControllerBuilder.Instance; mem_controller = smc_builder.BuildClientController( SM_CLIENT_NAME, SM_SERVER_CAPACITY, SM_CLIENT_CAPACITY); setBusy(false); }
/// <summary> /// Disposes of both the Shared Memory and the MessageWindows.Instance. /// </summary> public void Done() { _sharedMemoryController = null; _active = false; }